diff options
author | SmileTheory <SmileTheory@gmail.com> | 2014-02-14 03:31:54 -0800 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:39 +0100 |
commit | cd1f82e437e8a5747ae63a46d4899996290c2b8f (patch) | |
tree | 2568262bbfefaea9addec9e98e7db23a7f8bd881 /src/renderergl2/tr_bsp.c | |
parent | 05b86c0505617962685b5ce9112d04c1bc251a60 (diff) |
OpenGL2: Oops, set lightmap alpha to 1.
Diffstat (limited to 'src/renderergl2/tr_bsp.c')
-rw-r--r-- | src/renderergl2/tr_bsp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/renderergl2/tr_bsp.c b/src/renderergl2/tr_bsp.c index ee0dc516..f800e46e 100644 --- a/src/renderergl2/tr_bsp.c +++ b/src/renderergl2/tr_bsp.c @@ -387,7 +387,7 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { { if (hdrLightmap) { - float color[3]; + vec4_t color; #if 0 // HDRFILE_RGBE float exponent = exp2(buf_p[j*4+3] - 128); @@ -402,6 +402,8 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { color[1] = LittleFloat(color[1]); color[2] = LittleFloat(color[2]); #endif + color[3] = 1.0f; + R_ColorShiftLightingFloats(color, color, 1.0f/255.0f); if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer) @@ -411,7 +413,7 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { } else if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer) { - float color[3]; + vec4_t color; //hack: convert LDR lightmap to HDR one color[0] = MAX(buf_p[j*3+0], 0.499f); @@ -427,6 +429,7 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { color[1] = avg; color[2] = avg; } + color[3] = 1.0f; R_ColorShiftLightingFloats(color, color, 1.0f/255.0f); |