Files
OpenRA/glsl/postprocess_tint.frag
2023-10-22 19:51:46 +03:00

15 lines
330 B
GLSL

#version {VERSION}
#ifdef GL_ES
precision mediump float;
#endif
uniform vec3 Tint;
uniform sampler2D WorldTexture;
out vec4 fragColor;
void main()
{
vec4 c = texture(WorldTexture, gl_FragCoord.xy / textureSize(WorldTexture, 0));
fragColor = vec4(min(c.r * Tint.r, 1.0), min(c.g * Tint.g, 1.0), min(c.b * Tint.b, 1.0), c.a);
}