mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 15:47:55 +00:00
ref: soft: reorder applying light gamma
This commit is contained in:
parent
519c8a032a
commit
55dfa1bf44
@ -211,13 +211,9 @@ static void R_BuildLightMap( void )
|
||||
|
||||
for( i = 0, bl = blocklights; i < size; i++, bl += 1, lm++ )
|
||||
{
|
||||
bl[0] += gEngfuncs.LightToTexGamma( lm->r ) * scale;
|
||||
bl[0] += gEngfuncs.LightToTexGamma( lm->g ) * scale;
|
||||
bl[0] += gEngfuncs.LightToTexGamma( lm->b ) * scale;
|
||||
|
||||
//printf("test\n");
|
||||
//bl[1] += gEngfuncs.LightToTexGamma( lm->g ) * scale;
|
||||
//bl[2] += gEngfuncs.LightToTexGamma( lm->b ) * scale;
|
||||
bl[0] += lm->r * scale;
|
||||
bl[1] += lm->g * scale;
|
||||
bl[2] += lm->b * scale;
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,7 +241,10 @@ static void R_BuildLightMap( void )
|
||||
// bound, invert, and shift
|
||||
for (i=0 ; i<size ; i++)
|
||||
{
|
||||
t = (int)blocklights[i];
|
||||
if( blocklights[i] < 65280 )
|
||||
t = gEngfuncs.LightToTexGammaEx( blocklights[i] >> 6 ) << 6;
|
||||
else t = (int)blocklights[i];
|
||||
|
||||
if (t < 0)
|
||||
t = 0;
|
||||
if( t > 65535 * 3 )
|
||||
|
Loading…
Reference in New Issue
Block a user