summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_bsp.c
diff options
context:
space:
mode:
authorSmileTheory <SmileTheory@gmail.com>2013-10-07 01:46:50 -0700
committerTim Angus <tim@ngus.net>2014-06-17 17:43:34 +0100
commitaab8097479f71fa789a6030c047f5df882848368 (patch)
tree5ce2ffb4d2ca39552ef976ec0d816a132edfdd92 /src/renderergl2/tr_bsp.c
parent20086c573fcd1532b6d82f94b0930c52d3802a56 (diff)
OpenGL2: default to RGBM lightmap, and add r_floatLightmap for old behaviour.
Diffstat (limited to 'src/renderergl2/tr_bsp.c')
-rw-r--r--src/renderergl2/tr_bsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderergl2/tr_bsp.c b/src/renderergl2/tr_bsp.c
index 4aac6de0..94c42e1c 100644
--- a/src/renderergl2/tr_bsp.c
+++ b/src/renderergl2/tr_bsp.c
@@ -272,7 +272,7 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) {
if (r_hdr->integer)
{
- if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel)
+ if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer)
textureInternalFormat = GL_RGBA16F_ARB;
else
textureInternalFormat = GL_RGBA8;
@@ -411,7 +411,7 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) {
VectorScale(color, lightScale, color);
- if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel)
+ if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer)
ColorToRGBA16F(color, (unsigned short *)(&image[j*8]));
else
ColorToRGBM(color, &image[j*4]);