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.
15 lines
281 B
15 lines
281 B
12 years ago
|
uniform float u_Time;
|
||
|
uniform sampler2D u_Tex0;
|
||
|
varying vec2 v_TexCoord;
|
||
|
|
||
|
vec4 grayscale(vec4 color)
|
||
|
{
|
||
|
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
|
||
|
return vec4(gray, gray, gray, 1);
|
||
|
}
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
gl_FragColor = grayscale(texture2D(u_Tex0, v_TexCoord));
|
||
|
}
|