stk-code_catmod/data/shaders/transparent.frag
Vincent Lejeune f98ff2a5fc Fix skid mark color
We convert the vertex color value to srgb, optimally the vertex color
should already be corrected on cpu side but it would break fallback
colors...
2014-04-13 18:00:15 +02:00

19 lines
309 B
GLSL

uniform sampler2D tex;
#if __VERSION__ >= 130
in vec2 uv;
in vec4 color;
out vec4 FragColor;
#else
varying vec2 uv;
#define FragColor gl_FragColor
#endif
void main()
{
vec4 Color = texture(tex, uv) * pow(color, vec4(2.2));
// Premultiply alpha
FragColor = vec4(Color.rgb * Color.a, Color.a);
}