Commit 28d17b2f authored by Anakin's avatar Anakin

trying to workaround gamma correction (remove from tga)

parent 9fb3ca03
......@@ -32,6 +32,7 @@ void main()
// some values
vec3 normalWorld = normalize(n_matrix * v_surfaceNormal);
vec4 surfaceColor = vec4(texture2D(texture, v_surfaceUV));
surfaceColor.rgb = pow(surfaceColor.rgb, vec3(2.2));
if(!b_transparent)
surfaceColor.a = 1.0f;
vec3 surfaceToLight = normalize(light.position - v_surfacePosition);
......@@ -60,6 +61,7 @@ void main()
// final color after gama correction
vec3 gamma = vec3(1.0/2.2);
gl_FragColor = vec4(pow(linearColor, gamma), surfaceColor.a);
//gl_FragColor = vec4(linearColor, surfaceColor.a);
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment