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...
This commit is contained in:
Vincent Lejeune 2014-04-13 18:00:15 +02:00
parent 3cd85a829e
commit f98ff2a5fc
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ varying vec2 uv;
void main()
{
vec4 Color = texture(tex, uv) * color;
vec4 Color = texture(tex, uv) * pow(color, vec4(2.2));
// Premultiply alpha
FragColor = vec4(Color.rgb * Color.a, Color.a);
}

View File

@ -21,7 +21,7 @@ varying vec2 uv;
void main()
{
vec4 diffusecolor = texture(tex, uv) * color;
vec4 diffusecolor = texture(tex, uv) * pow(color, vec4(2.2));
vec3 tmp = vec3(gl_FragCoord.xy / screen, gl_FragCoord.z);
tmp = 2. * tmp - 1.;