Skip to content

Instantly share code, notes, and snippets.

@akella
Created January 26, 2020 07:40
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 akella/76cb05aa932b5dd151ea6af8902654d3 to your computer and use it in GitHub Desktop.
Save akella/76cb05aa932b5dd151ea6af8902654d3 to your computer and use it in GitHub Desktop.
hands sprite
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