mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: client: gamma: fix gamma when compiled with -ffast-math
This commit is contained in:
@@ -52,8 +52,9 @@ static void BuildGammaTable( const float gamma, const float brightness, const fl
|
||||
|
||||
for( i = 0; i < 256; i++ )
|
||||
{
|
||||
double d = pow( i / 255.0, (double)g2 );
|
||||
int inf = d * 255.0;
|
||||
// keep it float or texgamma test will fail with -ffast-math
|
||||
float d = pow( i / 255.0, (double)g2 );
|
||||
int inf = d * 255.0f;
|
||||
texgammatable[i] = bound( 0, inf, 255 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user