tibia-client/modules/game_shaders/shaders/grayscale.frag

15 lines
281 B
GLSL
Raw Normal View History

2012-06-14 20:26:55 +02:00
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));
}