always use color normalization, vector normalization on colors is worng

This commit is contained in:
Rudolf Polzer 2011-12-18 22:36:53 +01:00
parent bb15de2ddc
commit 272a29bdd8
2 changed files with 3 additions and 3 deletions

View File

@ -4099,7 +4099,7 @@ void SetupFloodLight( void )
floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(floodlightRGB[1]); floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(floodlightRGB[1]);
floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(floodlightRGB[2]); floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(floodlightRGB[2]);
} }
VectorNormalize(floodlightRGB,floodlightRGB); ColorNormalize(floodlightRGB,floodlightRGB);
} }
/* /*

View File

@ -1309,7 +1309,7 @@ static void ParseShaderFile( const char *filename )
} }
/* normalize it */ /* normalize it */
VectorNormalize( sun->color, sun->color ); ColorNormalize( sun->color, sun->color );
/* scale color by brightness */ /* scale color by brightness */
GetTokenAppend( shaderText, qfalse ); GetTokenAppend( shaderText, qfalse );
@ -1546,7 +1546,7 @@ static void ParseShaderFile( const char *filename )
si->floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[1]); si->floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[1]);
si->floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[2]); si->floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[2]);
} }
VectorNormalize(si->floodlightRGB, si->floodlightRGB); ColorNormalize(si->floodlightRGB, si->floodlightRGB);
} }
/* jal: q3map_nodirty : skip dirty */ /* jal: q3map_nodirty : skip dirty */