Created
January 26, 2020 07:40
-
-
Save akella/76cb05aa932b5dd151ea6af8902654d3 to your computer and use it in GitHub Desktop.
hands sprite
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
void main() { | |
vec2 uv1 = vUv; | |
float uTime = vColor*time*10.; | |
vec2 offset = vec2( | |
floor(mod(uTime, 5.)), | |
4. - mod(floor(uTime / 5.), 5.) | |
); | |
uv1 = uv1 / 5.; | |
uv1 += offset/5.; | |
vec4 color = texture2D(sprite,uv1); | |
gl_FragColor = vec4(vUv,0.,1.); | |
gl_FragColor = color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment