You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
242 B

  1. #ifdef GL_ES
  2. precision mediump float;
  3. #endif
  4. varying vec2 V_Texcoord;
  5. uniform sampler2D U_Texture;
  6. void main()
  7. {
  8. vec4 color=texture2D(U_Texture,V_Texcoord);
  9. float gray=(color.r+color.g+color.b)/3.0;
  10. gl_FragColor=vec4(gray,gray,gray,1.0);
  11. }