LYGIA Shader Library

map (lygia/v1.1.6/lighting/raymarch/map)

map of SDF functions to be declare

Use:

<vec4> raymarchMap( in <vec3> pos )

Check it on Github


#ifndef RAYMARCH_MAP_FNC
#define RAYMARCH_MAP_FNC(POS) raymarchMap(POS)
#endif

#ifndef RAYMARCH_MAP_TYPE
#define RAYMARCH_MAP_TYPE vec4
#endif

#ifndef RAYMARCH_MAP_DISTANCE
#define RAYMARCH_MAP_DISTANCE a
#endif

#ifndef RAYMARCH_MAP_MATERIAL
#define RAYMARCH_MAP_MATERIAL rgb
#endif

#ifndef FNC_RAYMARCHMAP
#define FNC_RAYMARCHMAP

RAYMARCH_MAP_TYPE RAYMARCH_MAP_FNC( in vec3 pos );

#endif

Use:

<float4> raymarchMap( in <float3> pos )

Check it on Github


#ifndef RAYMARCH_MAP_FNC
#define RAYMARCH_MAP_FNC(POS) raymarchMap(POS)
#endif

#ifndef RAYMARCH_MAP_TYPE
#define RAYMARCH_MAP_TYPE float4
#endif

#ifndef RAYMARCH_MAP_DISTANCE
#define RAYMARCH_MAP_DISTANCE a
#endif

#ifndef RAYMARCH_MAP_MATERIAL
#define RAYMARCH_MAP_MATERIAL rgb
#endif

#ifndef FNC_RAYMARCHMAP
#define FNC_RAYMARCHMAP

RAYMARCH_MAP_TYPE RAYMARCH_MAP_FNC( in float3 pos );

#endif

Use:

<float4> raymarchMap( in <vec3> pos )

Check it on Github


#ifndef RAYMARCH_MAP_FNC
#define RAYMARCH_MAP_FNC(POS) raymarchMap(POS)
#endif

#ifndef RAYMARCH_MAP_TYPE
#define RAYMARCH_MAP_TYPE float4
#endif

#ifndef RAYMARCH_MAP_DISTANCE
#define RAYMARCH_MAP_DISTANCE w
#endif

#ifndef FNC_RAYMARCHMAP
#define FNC_RAYMARCHMAP

RAYMARCH_MAP_TYPE RAYMARCH_MAP_FNC(const float3& pos);

#endif

Examples

LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.

Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).

It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.

Get the latest news and releases

Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository