Skip to content
Snippets Groups Projects
Commit 28d17b2f authored by Anakin's avatar Anakin
Browse files

trying to workaround gamma correction (remove from tga)

parent 9fb3ca03
No related branches found
No related tags found
No related merge requests found
......@@ -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
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment