Skip to content

Commit 0efd9a5

Browse files
authored
Merge pull request #391 from Unusuario2/extrapasses-commandline
added support for "-extrapasses" command line.
2 parents fa6d7e4 + cf16d32 commit 0efd9a5

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

sp/src/utils/vrad/vrad.cpp

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,6 +2500,26 @@ int ParseCommandLine( int argc, char **argv, bool *onlydetail )
25002500
return 1;
25012501
}
25022502
}
2503+
#ifdef MAPBASE
2504+
else if (!Q_stricmp(argv[i], "-extrapasses"))
2505+
{
2506+
if (++i < argc)
2507+
{
2508+
int extrapassesParam = atoi(argv[i]);
2509+
if (extrapassesParam < 0)
2510+
{
2511+
Warning("Error: expected non-negative value after '-extrapasses'\n");
2512+
return 1;
2513+
}
2514+
extrapasses = extrapassesParam;
2515+
}
2516+
else
2517+
{
2518+
Warning("Error: expected a value after '-extrapasses'\n");
2519+
return 1;
2520+
}
2521+
}
2522+
#endif
25032523
else if (!Q_stricmp(argv[i],"-centersamples"))
25042524
{
25052525
do_centersamples = true;
@@ -2791,7 +2811,10 @@ void PrintUsage( int argc, char **argv )
27912811
#endif
27922812
" -fastambient : Per-leaf ambient sampling is lower quality to save compute time.\n"
27932813
" -final : High quality processing. equivalent to -extrasky 16.\n"
2794-
" -extrasky n : trace N times as many rays for indirect light and sky ambient.\n"
2814+
" -extrasky # : trace # times as many rays for indirect light and sky ambient.\n"
2815+
#ifdef MAPBASE
2816+
" -extrapasses # : Lets you scale how many extra passes you want your map to go through (default 4), differences above this value are minimal.\n"
2817+
#endif
27952818
" -low : Run as an idle-priority process.\n"
27962819
" -mpi : Use VMPI to distribute computations.\n"
27972820
" -rederror : Show errors in red.\n"
@@ -2825,7 +2848,7 @@ void PrintUsage( int argc, char **argv )
28252848
" -loghash : Log the sample hash table to samplehash.txt.\n"
28262849
" -onlydetail : Only light detail props and per-leaf lighting.\n"
28272850
" -maxdispsamplesize #: Set max displacement sample size (default: 512).\n"
2828-
" -softsun <n> : Treat the sun as an area light source of size <n> degrees."
2851+
" -softsun # : Treat the sun as an area light source of size # degrees."
28292852
" Produces soft shadows.\n"
28302853
" Recommended values are between 0 and 5. Default is 0.\n"
28312854
" -FullMinidumps : Write large minidumps on crash.\n"

0 commit comments

Comments
 (0)