demotool/map.glsl

6 lines
116 B
GLSL

vec2 map( vec3 pos )
{
vec3 q = pos;
q.xy = mod( q.xy + 2. , 4. ) - 2.;
return vec2( length( q ) - 2.1 , 0. );
}