mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-27 22:42:09 +00:00
OpenGL2: Oops, set lightmap alpha to 1.
This commit is contained in:
parent
7a23bb1c59
commit
78f8100d74
1 changed files with 5 additions and 2 deletions
|
@ -386,7 +386,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);
|
||||
|
@ -401,6 +401,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)
|
||||
|
@ -410,7 +412,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);
|
||||
|
@ -426,6 +428,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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue