Advertisement
Guest User

Untitled

a guest
Dec 6th, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.46 KB | None | 0 0
  1. #ifdef GL_ES
  2. precision mediump float;
  3. #endif
  4.  
  5. varying vec2 v_texCoord;
  6. varying vec2 v_pos;
  7.  
  8. uniform sampler2D u_noise;
  9. uniform sampler2D u_texture;
  10.  
  11. void main() {
  12.     vec4 grassColor = texture2D(u_texture, v_texCoord);
  13.     vec4 noiseColor = texture2D(u_noise, v_pos);
  14.  
  15.     vec4 color = vec4(noiseColor.r*0.2+grassColor.r/1.2, grassColor.g, grassColor.b, 1.0);
  16.     color.a = grassColor.a;
  17.  
  18.     gl_FragColor = color;
  19.  
  20.     if (gl_FragColor.a < 0.7) discard;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement