Created
January 24, 2013 03:12
-
-
Save tmcw/4617338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; | |
void main (void) { | |
float x = gl_FragCoord.xy.x / 1.0; | |
float y = gl_FragCoord.xy.y / 1.0; | |
float color=1.0; | |
for (int i = 0; i < 1000; i++) { | |
if (int(mod(x, 3.0)) == 1 && int(mod(y, 3.0)) == 1) { | |
color = 0.0; | |
break; | |
} | |
x = x/3.0; | |
y = y/3.0; | |
} | |
gl_FragColor = vec4( vec3( color, color, color ), 1.0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment