Guest User

Untitled

a guest
Nov 18th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. uniform sampler2D texture;
  2. uniform ivec2 u_size;
  3. out vec4 o_fragColor;
  4.  
  5. void main()
  6. {
  7. vec4 color = texture(texture, gl_FragCoord.xy / u_size);
  8. float grayScale = ((color.r * 0.109375) + (color.g * 0.30078125) + (color.b * 0.58984375));
  9. o_fragColor = vec4(grayScale, grayScale, grayScale, 1);
  10. }
Add Comment
Please, Sign In to add comment