summaryrefslogtreecommitdiff
path: root/src/renderergl2/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2/glsl')
-rw-r--r--src/renderergl2/glsl/generic_fp.glsl4
-rw-r--r--src/renderergl2/glsl/lightall_fp.glsl4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/renderergl2/glsl/generic_fp.glsl b/src/renderergl2/glsl/generic_fp.glsl
index dea52e06..997d4daa 100644
--- a/src/renderergl2/glsl/generic_fp.glsl
+++ b/src/renderergl2/glsl/generic_fp.glsl
@@ -20,8 +20,8 @@ void main()
vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
#if defined(USE_LIGHTMAP)
vec4 color2 = texture2D(u_LightMap, var_LightTex);
- #if defined(RGBE_LIGHTMAP)
- color2.rgb *= exp2(color2.a * 255.0 - 128.0);
+ #if defined(RGBM_LIGHTMAP)
+ color2.rgb *= 32.0 * color2.a;
color2.a = 1.0;
#endif
diff --git a/src/renderergl2/glsl/lightall_fp.glsl b/src/renderergl2/glsl/lightall_fp.glsl
index efd01399..6aec2b4a 100644
--- a/src/renderergl2/glsl/lightall_fp.glsl
+++ b/src/renderergl2/glsl/lightall_fp.glsl
@@ -285,8 +285,8 @@ void main()
#if defined(USE_LIGHTMAP)
vec4 lightSample = texture2D(u_LightMap, var_LightTex).rgba;
- #if defined(RGBE_LIGHTMAP)
- lightSample.rgb *= exp2(lightSample.a * 255.0 - 128.0);
+ #if defined(RGBM_LIGHTMAP)
+ lightSample.rgb *= 32.0 * lightSample.a;
#endif
vec3 lightColor = lightSample.rgb;
#elif defined(USE_LIGHT_VECTOR) && !defined(USE_FAST_LIGHT)