add option -nofastpoint; make old buggy behaviour default as it is typically a lot faster. To not use fast point lights, pass -nofastpoint but not -fast.

This commit is contained in:
Rudolf Polzer 2012-02-09 11:28:49 +01:00
parent 8dcd2d22e6
commit d5d6e98191
3 changed files with 10 additions and 1 deletions

View File

@ -2567,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" ) )

View File

@ -3623,6 +3623,8 @@ void SetupEnvelopes( qboolean forGrid, qboolean fastFlag )
light->flags |= LIGHT_FAST_TEMP;
else
light->flags &= ~LIGHT_FAST_TEMP;
if( fastpoint && (light->flags != EMIT_AREA) )
light->flags |= LIGHT_FAST_TEMP;
if( light->si && light->si->noFast )
light->flags &= ~(LIGHT_FAST | LIGHT_FAST_TEMP);

View File

@ -2226,6 +2226,7 @@ Q_EXTERN qboolean debugDeluxemap Q_ASSIGN( qfalse );
Q_EXTERN int deluxemode Q_ASSIGN( 0 ); /* deluxemap format (0 - modelspace, 1 - tangentspace with renormalization, 2 - tangentspace without renormalization) */
Q_EXTERN qboolean fast Q_ASSIGN( qfalse );
Q_EXTERN qboolean fastpoint Q_ASSIGN( qtrue );
Q_EXTERN qboolean faster Q_ASSIGN( qfalse );
Q_EXTERN qboolean fastgrid Q_ASSIGN( qfalse );
Q_EXTERN qboolean fastbounce Q_ASSIGN( qfalse );