From 4891ea16f88ebc6a99b516a593230e2fa386b014 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Mon, 7 Dec 2020 17:02:57 +0100 Subject: [PATCH] Delete -cpma light flag. As we cannot support it. -slow is now replacing the -fast flag that should really be the default. --- tools/vmap/help.c | 9 +++---- tools/vmap/light.c | 52 +++++++++++++++------------------------- tools/vmap/light_ydnar.c | 4 ++-- tools/vmap/vmap.h | 1 - 4 files changed, 24 insertions(+), 42 deletions(-) diff --git a/tools/vmap/help.c b/tools/vmap/help.c index 7fbb580..14a3ded 100644 --- a/tools/vmap/help.c +++ b/tools/vmap/help.c @@ -165,7 +165,6 @@ void HelpLight() {"-cheapgrid", "Use `-cheap` style lighting for radiosity"}, {"-cheap", "Abort vertex light calculations when white is reached"}, {"-compensate ", "Lightmap compensate (darkening factor applied after everything else)"}, - {"-cpma", "CPMA vertex lighting mode"}, {"-custinfoparms", "Read scripts/custinfoparms.txt"}, {"-dark", "Darken lightmap seams"}, {"-debugaxis", "Color the lightmaps according to the lightmap axis"}, @@ -191,13 +190,11 @@ void HelpLight() {"-exposure ", "Lightmap exposure to better support overbright spots"}, {"-external", "Force external lightmaps even if at size of internal lightmaps"}, {"-extravisnudge", "Broken feature to nudge the luxel origin to a better vis cluster"}, - {"-extrawide", "Deprecated alias for `-super 2 -filter`"}, - {"-extra", "Deprecated alias for `-super 2`"}, {"-fastallocate", "Use `-fastallocate` to trade lightmap size against allocation time (useful with hi res lightmaps on large maps: reduce allocation time from days to minutes for only some extra bytes)"}, - {"-fastbounce", "Use `-fast` style lighting for radiosity"}, + {"-slowbounce", "Use the slower method for calculating light spread"}, + {"-slowgrid", "Uses slower method for calculating light spread"}, + {"-slow", "Disable fast envelope/distance calculation for lights"}, {"-faster", "Use a faster falloff curve for lighting; also implies `-fast`"}, - {"-fastgrid", "Use `-fast` style lighting for the light grid"}, - {"-fast", "Ignore tiny light contributions"}, {"-filter", "Lightmap filtering"}, {"-floodlight", "Enable floodlight (zero-effort somewhat decent lighting)"}, {"-gamma ", "Lightmap gamma"}, diff --git a/tools/vmap/light.c b/tools/vmap/light.c index 843c390..19283ec 100644 --- a/tools/vmap/light.c +++ b/tools/vmap/light.c @@ -2250,6 +2250,10 @@ int LightMain( int argc, char **argv ){ qboolean lightSamplesInsist = qfalse; qboolean fastAllocate = qfalse; + fast = qtrue; + fastgrid = qtrue; + fastbounce = qtrue; + /* note it */ Sys_Printf( "--- Light ---\n" ); Sys_Printf( "--- ProcessGameSpecific ---\n" ); @@ -2749,21 +2753,26 @@ int LightMain( int argc, char **argv ){ } } - else if ( !strcmp( argv[ i ], "-smooth" ) ) { - lightSamples = EXTRA_SCALE; - 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 for all area lights\n" ); + else if ( !strcmp( argv[ i ], "-slow" ) ) { + fast = qfalse; + fastgrid = qfalse; + fastbounce = qfalse; + Sys_Printf( "Fast envelope/distance calculation disabled.\n" ); + } + + else if ( !strcmp( argv[ i ], "-slowgrid" ) ) { + fastgrid = qfalse; + Sys_Printf( "Fast grid lighting disabled\n" ); + } + + else if ( !strcmp( argv[ i ], "-slowbounce" ) ) { + fastbounce = qfalse; + Sys_Printf( "Fast bounce mode disabled\n" ); } else if ( !strcmp( argv[ i ], "-faster" ) ) { @@ -2779,16 +2788,6 @@ int LightMain( int argc, char **argv ){ Sys_Printf( "Fast allocation mode enabled\n" ); } - else if ( !strcmp( argv[ i ], "-fastgrid" ) ) { - fastgrid = qtrue; - Sys_Printf( "Fast grid lighting enabled\n" ); - } - - else if ( !strcmp( argv[ i ], "-fastbounce" ) ) { - fastbounce = qtrue; - Sys_Printf( "Fast bounce mode enabled\n" ); - } - else if ( !strcmp( argv[ i ], "-cheap" ) ) { cheap = qtrue; cheapgrid = qtrue; @@ -2859,15 +2858,6 @@ int LightMain( int argc, char **argv ){ patchShadows = qtrue; Sys_Printf( "Patch shadow casting enabled\n" ); } - else if ( !strcmp( argv[ i ], "-extra" ) ) { - superSample = EXTRA_SCALE; /* ydnar */ - Sys_Printf( "The -extra argument is deprecated, use \"-super 2\" instead\n" ); - } - else if ( !strcmp( argv[ i ], "-extrawide" ) ) { - superSample = EXTRAWIDE_SCALE; /* ydnar */ - filter = qtrue; /* ydnar */ - Sys_Printf( "The -extrawide argument is deprecated, use \"-filter [-super 2]\" instead\n" ); - } else if ( !strcmp( argv[ i ], "-samplesize" ) ) { sampleSize = atoi( argv[ i + 1 ] ); if ( sampleSize < 1 ) { @@ -2943,10 +2933,6 @@ int LightMain( int argc, char **argv ){ noStyles = qfalse; Sys_Printf( "Enabling lightstyles\n" ); } - else if ( !strcmp( argv[ i ], "-cpma" ) ) { - cpmaHack = qtrue; - Sys_Printf( "Enabling Challenge Pro Mode Asstacular Vertex Lighting Mode (tm)\n" ); - } else if ( !strcmp( argv[ i ], "-floodlight" ) ) { floodlighty = qtrue; Sys_Printf( "FloodLighting enabled\n" ); diff --git a/tools/vmap/light_ydnar.c b/tools/vmap/light_ydnar.c index 6da91ef..100742a 100644 --- a/tools/vmap/light_ydnar.c +++ b/tools/vmap/light_ydnar.c @@ -2849,9 +2849,9 @@ void IlluminateVertexes( int num ){ ----------------------------------------------------------------- */ /* calculate vertex lighting for surfaces without lightmaps */ - if ( lm == NULL || cpmaHack ) { + if ( lm == NULL ) { /* setup trace */ - trace.testOcclusion = ( cpmaHack && lm != NULL ) ? qfalse : !noTrace; + trace.testOcclusion = ( lm != NULL ) ? qfalse : !noTrace; trace.forceSunlight = info->si->forceSunlight; trace.recvShadows = info->recvShadows; trace.numSurfaces = 1; diff --git a/tools/vmap/vmap.h b/tools/vmap/vmap.h index 110a480..0484aab 100644 --- a/tools/vmap/vmap.h +++ b/tools/vmap/vmap.h @@ -2210,7 +2210,6 @@ Q_EXTERN qboolean noGridLighting Q_ASSIGN( qfalse ); Q_EXTERN qboolean noTrace Q_ASSIGN( qfalse ); Q_EXTERN qboolean noSurfaces Q_ASSIGN( qfalse ); Q_EXTERN qboolean patchShadows Q_ASSIGN( qfalse ); -Q_EXTERN qboolean cpmaHack Q_ASSIGN( qfalse ); Q_EXTERN qboolean deluxemap Q_ASSIGN( qfalse ); Q_EXTERN qboolean debugDeluxemap Q_ASSIGN( qfalse );