diff --git a/data/shaders/utils/getLightFactor.frag b/data/shaders/utils/getLightFactor.frag index af0feed66..c7584c6a1 100644 --- a/data/shaders/utils/getLightFactor.frag +++ b/data/shaders/utils/getLightFactor.frag @@ -10,6 +10,7 @@ uniform sampler2D SSAO; vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue) { +#if defined(Advanced_Lighting_Enabled) vec2 tc = gl_FragCoord.xy / screen; vec3 DiffuseComponent = texture(DiffuseMap, tc).xyz; vec3 SpecularComponent = texture(SpecularMap, tc).xyz; @@ -17,4 +18,11 @@ vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapVa vec3 tmp = diffuseMatColor * DiffuseComponent * (1. - specMapValue) + specularMatColor * SpecularComponent * specMapValue; vec3 emitCol = diffuseMatColor.xyz * diffuseMatColor.xyz * diffuseMatColor.xyz * 15.; return tmp * ao + (emitMapValue * emitCol); +#else +#if defined(GL_ES) + return diffuseMatColor * 0.73; // 0.5 ^ (1. / 2.2) +#else + return diffuseMatColor * 0.5; +#endif +#endif }