diff options
author | SmileTheory <SmileTheory@gmail.com> | 2014-02-13 18:04:23 -0800 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:39 +0100 |
commit | 0df612b754067973315d33531bbc8c4dcd9b260a (patch) | |
tree | f8f407a23cd19a686832fac53142aae2a41e7015 /src/renderergl2/glsl | |
parent | 34db22cbee9443e69bcd556996cea272a95de4ae (diff) |
OpenGL2: Set RGBM to use a multiplier of 1, and only use it with HDR lightmaps.
Diffstat (limited to 'src/renderergl2/glsl')
-rw-r--r-- | src/renderergl2/glsl/generic_fp.glsl | 2 | ||||
-rw-r--r-- | src/renderergl2/glsl/lightall_fp.glsl | 2 |
2 files changed, 2 insertions, 2 deletions
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); |