]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
always use color normalization, vector normalization on colors is worng
authorRudolf Polzer <divverent@alientrap.org>
Sun, 18 Dec 2011 21:36:53 +0000 (22:36 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 18 Dec 2011 21:36:53 +0000 (22:36 +0100)
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/shaders.c

index 80796dcdd839e3157ef5c0a530800dd508a8c747..3bf04ba76dcf457ad157bfb9ef16e2878e4ee1f0 100644 (file)
@@ -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);
 }
 
 /*
index e8eb43a65700390256d327de8d05f0c7e85e22d0..11b9d6183a68169852196ad40f686152ab9257d8 100644 (file)
@@ -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 */