Created
August 24, 2014 00:52
-
-
Save ishikawash/5cdb48458ecbac35a814 to your computer and use it in GitHub Desktop.
Stripe shader
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
#version 120 | |
uniform float rows; | |
uniform float cols; | |
void main() | |
{ | |
int x = int(floor(gl_TexCoord[0].x * cols)); | |
int y = int(floor(gl_TexCoord[0].y * rows)); | |
if (mod(x + y, 2) == 0) { | |
gl_FragColor = vec4(1); | |
} else { | |
gl_FragColor = vec4(0, 0, 0, 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment