a991fe8e4d
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1550 4e206d99-4929-0410-ac5d-dfc041789085
12 lines
292 B
Plaintext
12 lines
292 B
Plaintext
uniform sampler2D texture;
|
|
uniform vec3 color;
|
|
|
|
void main()
|
|
{
|
|
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * gl_Color;
|
|
float gray = pixel.r * 0.39 + pixel.g * 0.50 + pixel.b * 0.11;
|
|
|
|
gl_FragColor = vec4(gray * color, 1.0) * 0.6 + pixel * 0.4;
|
|
gl_FragColor.a = pixel.a;
|
|
}
|