Fixed a grass being too dark in some places.

It seems to be an inconsistency in using sRGB rendering.
This commit is contained in:
Deve 2016-07-07 01:52:22 +02:00
parent 66e76be76d
commit 2b734a9579

View File

@ -23,7 +23,13 @@ void main()
#ifdef Use_Bindless_Texture
diffusecolor.xyz = pow(diffusecolor.xyz, vec3(2.2));
#endif
#ifndef GL_ES
diffusecolor.xyz *= pow(color.xyz, vec3(2.2));
#else
diffusecolor.xyz *= pow(color.xyz, vec3(1.0 / 2.2));
#endif
diffusecolor.a *= color.a;
vec3 tmp = vec3(gl_FragCoord.xy / screen, gl_FragCoord.z);
tmp = 2. * tmp - 1.;