From: Rudolf Polzer Date: Sun, 18 Dec 2011 21:36:53 +0000 (+0100) Subject: always use color normalization, vector normalization on colors is worng X-Git-Tag: xonotic-v0.6.0~36^2 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=272a29bdd88cea0e1d69dda75892c83db9b23abe;hp=bb15de2ddc9f86be499210b28bc2525770c3dcaa always use color normalization, vector normalization on colors is worng --- diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 80796dcd..3bf04ba7 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -4099,7 +4099,7 @@ void SetupFloodLight( void ) floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(floodlightRGB[1]); floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(floodlightRGB[2]); } - VectorNormalize(floodlightRGB,floodlightRGB); + ColorNormalize(floodlightRGB,floodlightRGB); } /* diff --git a/tools/quake3/q3map2/shaders.c b/tools/quake3/q3map2/shaders.c index e8eb43a6..11b9d618 100644 --- a/tools/quake3/q3map2/shaders.c +++ b/tools/quake3/q3map2/shaders.c @@ -1309,7 +1309,7 @@ static void ParseShaderFile( const char *filename ) } /* normalize it */ - VectorNormalize( sun->color, sun->color ); + ColorNormalize( sun->color, sun->color ); /* scale color by brightness */ GetTokenAppend( shaderText, qfalse ); @@ -1546,7 +1546,7 @@ static void ParseShaderFile( const char *filename ) si->floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[1]); si->floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[2]); } - VectorNormalize(si->floodlightRGB, si->floodlightRGB); + ColorNormalize(si->floodlightRGB, si->floodlightRGB); } /* jal: q3map_nodirty : skip dirty */