]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
also support -sRGBcolor for floodlight
authorRudolf Polzer <divverent@alientrap.org>
Wed, 14 Dec 2011 08:39:44 +0000 (09:39 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 14 Dec 2011 08:51:15 +0000 (09:51 +0100)
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/shaders.c

index ed69504dd2783b58d4b291d94fd8a89c5fe22b3e..80796dcdd839e3157ef5c0a530800dd508a8c747 100644 (file)
@@ -4075,7 +4075,7 @@ void SetupFloodLight( void )
 
                if (VectorLength(floodlightRGB)==0)
                {
-                       VectorSet(floodlightRGB,240,240,255);
+                       VectorSet(floodlightRGB,0.94,0.94,1.0);
                }
 
                if (v4<1) v4=1024;
@@ -4091,9 +4091,13 @@ void SetupFloodLight( void )
        }
        else
        {
-               VectorSet(floodlightRGB,240,240,255);
-               //floodlighty = qtrue;
-               //Sys_Printf( "FloodLighting enabled via worldspawn _floodlight key.\n" );
+               VectorSet(floodlightRGB,0.94,0.94,1.0);
+       }
+       if(colorsRGB)
+       {
+               floodlightRGB[0] = Image_LinearFloatFromsRGBFloat(floodlightRGB[0]);
+               floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(floodlightRGB[1]);
+               floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(floodlightRGB[2]);
        }
        VectorNormalize(floodlightRGB,floodlightRGB);
 }
index ebe91fd8f6b41251330b9813c9838d1860b7d153..e8eb43a65700390256d327de8d05f0c7e85e22d0 100644 (file)
@@ -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);
+                                       VectorNormalize(si->floodlightRGB, si->floodlightRGB);
                                }
 
                                /* jal: q3map_nodirty : skip dirty */