Advertisement
Guest User

Untitled

a guest
Dec 19th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. uniform sampler2D texSampler;
  2. uniform float animation;
  3.  
  4. void main() {
  5.     vec4 tex = texture2D(texSampler, gl_TexCoord[0].st);
  6.     float diff = abs(animation - tex.r);
  7.    
  8.     if (animation>tex.r && tex.r>0.1 && diff<0.1)
  9.         gl_FragColor = vec4(1,1,1,1);
  10.     else discard;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement