]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/light.c
add option -nofastpoint; make old buggy behaviour default as it is typically a lot...
[xonotic/netradiant.git] / tools / quake3 / q3map2 / light.c
index 74ed5a46658848c04a941bd5e7cb455255310453..db1cc576c96d2e39e8b9baf789ebfabbd5038a34 100644 (file)
@@ -2289,6 +2289,16 @@ int LightMain( int argc, char **argv )
                        Sys_Printf( "Colors are linear\n" );
                }
 
+               else if( !strcmp( argv[ i ], "-nosRGB" ) )
+               {
+                       lightmapsRGB = qtrue;
+                       Sys_Printf( "Lighting is linear\n" );
+                       texturesRGB = qtrue;
+                       Sys_Printf( "Textures are linear\n" );
+                       colorsRGB = qtrue;
+                       Sys_Printf( "Colors are linear\n" );
+               }
+
                else if( !strcmp( argv[ i ], "-exposure" ) )
                {
                        f = atof( argv[ i + 1 ] );
@@ -2557,12 +2567,18 @@ int LightMain( int argc, char **argv )
                        Sys_Printf( "The -smooth argument is deprecated, use \"-samples 2\" instead\n" );
                }
                
+               else if( !strcmp( argv[ i ], "-nofastpoint" ) )
+               {
+                       fastpoint = qfalse;
+                       Sys_Printf( "Automatic fast mode for point lights disabled\n" );
+               }
+               
                else if( !strcmp( argv[ i ], "-fast" ) )
                {
                        fast = qtrue;
                        fastgrid = qtrue;
                        fastbounce = qtrue;
-                       Sys_Printf( "Fast mode enabled\n" );
+                       Sys_Printf( "Fast mode enabled for all area lights\n" );
                }
                
                else if( !strcmp( argv[ i ], "-faster" ) )
@@ -2842,6 +2858,10 @@ int LightMain( int argc, char **argv )
 
        }
 
+       /* fix up falloff tolerance for sRGB */
+       if(lightmapsRGB)
+               falloffTolerance = Image_LinearFloatFromsRGBFloat(falloffTolerance * (1.0 / 255.0)) * 255.0;
+
        /* fix up samples count */
        if(lightRandomSamples)
        {