From 0df612b754067973315d33531bbc8c4dcd9b260a Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Thu, 13 Feb 2014 18:04:23 -0800 Subject: OpenGL2: Set RGBM to use a multiplier of 1, and only use it with HDR lightmaps. --- src/renderergl2/glsl/generic_fp.glsl | 2 +- src/renderergl2/glsl/lightall_fp.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/renderergl2/glsl') diff --git a/src/renderergl2/glsl/generic_fp.glsl b/src/renderergl2/glsl/generic_fp.glsl index f485797f..aefa33c3 100644 --- a/src/renderergl2/glsl/generic_fp.glsl +++ b/src/renderergl2/glsl/generic_fp.glsl @@ -21,7 +21,7 @@ void main() #if defined(USE_LIGHTMAP) vec4 color2 = texture2D(u_LightMap, var_LightTex); #if defined(RGBM_LIGHTMAP) - color2.rgb *= 32.0 * color2.a; + color2.rgb *= color2.a; color2.a = 1.0; #endif diff --git a/src/renderergl2/glsl/lightall_fp.glsl b/src/renderergl2/glsl/lightall_fp.glsl index d134e409..b983d6fe 100644 --- a/src/renderergl2/glsl/lightall_fp.glsl +++ b/src/renderergl2/glsl/lightall_fp.glsl @@ -346,7 +346,7 @@ void main() vec4 lightSample = texture2D(u_LightMap, var_TexCoords.zw); vec3 lightColor = lightSample.rgb; #if defined(RGBM_LIGHTMAP) - lightColor *= 32.0 * lightSample.a; + lightColor *= lightSample.a; #endif #elif defined(USE_LIGHT_VECTOR) && !defined(USE_FAST_LIGHT) vec3 lightColor = u_DirectedLight * CalcLightAttenuation(float(var_LightDir.w > 0.0), var_LightDir.w / sqrLightDist); -- cgit