LYGIA Shader Library

mirrorTile (lygia/v1.1.4/space/mirrorTile)

mirror a tiles pattern

Dependencies:

Use:

<vec4> mirrorTile(<vec4> tile)
<vec4> mirrorTile(<vec2> st [, <float> scale])

Check it on Github



#ifndef FNC_mirrorTILE
#define FNC_mirrorTILE

vec4 mirrorTile(vec4 tile) { return vec4( mirror(tile.xy), tile.z, tile.w); }
vec4 mirrorTile(vec2 st) { return mirrorTile(sqTile(st)); }
vec4 mirrorTile(vec2 st, float scale) { return mirrorTile(st * scale); }

#endif

Dependencies:

Use:

<float4> mirrorTile(<float4> tile)
<float4> mirrorTile(<float2> st [, <float> scale])

Check it on Github



#ifndef FNC_mirrorTILE
#define FNC_mirrorTILE
float4 mirrorTile(float4 tile) { return float4( mirror(tile.xy), tile.z, tile.w); }
float4 mirrorTile(float2 st) { return mirrorTile(sqTile(st)); }
float4 mirrorTile(float2 st, float scale) { return mirrorTile(st * scale); }
#endif

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