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.
 
 
 

11 lines
242 B

#ifdef GL_ES
precision mediump float;
#endif
varying vec2 V_Texcoord;
uniform sampler2D U_Texture;
void main()
{
vec4 color=texture2D(U_Texture,V_Texcoord);
float gray=(color.r+color.g+color.b)/3.0;
gl_FragColor=vec4(gray,gray,gray,1.0);
}