Created
April 15, 2018 19:33
-
-
Save nthState/702157a23918643a8ada7ccbcafd8d33 to your computer and use it in GitHub Desktop.
Marching Ants
This file contains hidden or 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
/** | |
Drag marching ants on SKShapeNode stroke | |
https://stackoverflow.com/questions/16838907/drawing-marching-ants-using-directx | |
*/ | |
void main() { | |
float w = ((int)(v_tex_coord.x + v_tex_coord.y + (u_time*4)) % 8); | |
gl_FragColor = (w < 4 ? vec4(1,1,1,0) : vec4(0.48,0.84,0.99,1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment