Skip to content

Instantly share code, notes, and snippets.

@fand
Created May 12, 2017 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fand/ace1f42311ad87cd16743eb9cece7ca8 to your computer and use it in GitHub Desktop.
Save fand/ace1f42311ad87cd16743eb9cece7ca8 to your computer and use it in GitHub Desktop.
void main(void){
vec2 st = gl_FragCoord.xy/u_resolution.xy;
vec3 color = vec3(0.0);
// Divide the space in 4
st = tile(st,4.);
color += vec3(box(st,vec2(.96),0.01));
st = rotate2D(st,PI*0.25);
color += vec3(dia(st));
color = 1.0 - (box(st,vec2(1.2),0.01) - color);
gl_FragColor = vec4(color,1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment