@@ -126,6 +126,8 @@ bool g_bStaticPropLighting = false;
126
126
bool g_bStaticPropPolys = false ;
127
127
bool g_bTextureShadows = false ;
128
128
bool g_bDisablePropSelfShadowing = false ;
129
+ // dimhotepus: Use CS:GO mode by default instead of SteamPipe one.
130
+ IndirectPropLightingMode g_nIndirectPropLightingMode = IndirectPropLightingMode::CsGo;
129
131
130
132
131
133
CUtlVector<byte> g_FacesVisibleToLights;
@@ -2402,6 +2404,29 @@ static int ParseCommandLine( int argc, char **argv, bool *onlydetail )
2402
2404
Msg ( " --no-self-shadow-props: true\n " );
2403
2405
g_bDisablePropSelfShadowing = true ;
2404
2406
}
2407
+ else if ( !Q_stricmp ( argv[i], " -StaticPropIndirectMode" ) )
2408
+ {
2409
+ if ( ++i < argc )
2410
+ {
2411
+ int lightingMode = atoi ( argv[i] );
2412
+ if ( lightingMode < to_underlying (IndirectPropLightingMode::LowestValue) ||
2413
+ lightingMode > to_underlying (IndirectPropLightingMode::MaxValue) )
2414
+ {
2415
+ Error ( " Expected a value in range [%d...%d] after '-StaticPropIndirectMode', got %d.\n " ,
2416
+ to_underlying (IndirectPropLightingMode::LowestValue),
2417
+ to_underlying (IndirectPropLightingMode::MaxValue),
2418
+ lightingMode );
2419
+ return -1 ;
2420
+ }
2421
+ g_nIndirectPropLightingMode = static_cast <IndirectPropLightingMode>( lightingMode );
2422
+ Msg ( " --static-props-indirect-mode: %d\n " , lightingMode );
2423
+ }
2424
+ else
2425
+ {
2426
+ Error ( " Expected a value after '-StaticPropIndirectMode'\n " );
2427
+ return -1 ;
2428
+ }
2429
+ }
2405
2430
else if ( !Q_stricmp ( argv[i], " -textureshadows" ) )
2406
2431
{
2407
2432
Msg ( " --texture-shadows: true\n " );
@@ -2900,69 +2925,70 @@ void PrintUsage( int argc, char **argv )
2900
2925
" \n "
2901
2926
" Common options:\n "
2902
2927
" \n "
2903
- " -v (or -verbose) : Turn on verbose output (also shows more command\n "
2904
- " -bounce # : Set max number of bounces (default: 100).\n "
2905
- " -fast : Quick and dirty lighting.\n "
2906
- " -fastambient : Per-leaf ambient sampling is lower quality to save compute time.\n "
2907
- " -final : High quality processing. equivalent to -extrasky 16.\n "
2908
- " -extrasky n : trace N times as many rays for indirect light and sky ambient.\n "
2909
- " -low : Run as an idle-priority process.\n "
2910
- " -mpi : Use VMPI to distribute computations.\n "
2911
- " -rederror : Show errors in red.\n "
2928
+ " -v (or -verbose) : Turn on verbose output (also shows more command). \n "
2929
+ " -bounce # : Set max number of bounces (default: 100).\n "
2930
+ " -fast : Quick and dirty lighting.\n "
2931
+ " -fastambient : Per-leaf ambient sampling is lower quality to save compute time.\n "
2932
+ " -final : High quality processing. equivalent to -extrasky 16.\n "
2933
+ " -extrasky n : Trace N times as many rays for indirect light and sky ambient.\n "
2934
+ " -low : Run as an idle-priority process.\n "
2935
+ " -mpi : Use VMPI to distribute computations.\n "
2936
+ " -rederror : Show errors in red.\n "
2912
2937
" \n "
2913
- " -vproject <directory> : Override the VPROJECT environment variable.\n "
2914
- " -game <directory> : Same as -vproject.\n "
2938
+ " -vproject <directory> : Override the VPROJECT environment variable.\n "
2939
+ " -game <directory> : Same as -vproject.\n "
2915
2940
" \n "
2916
2941
" Other options:\n "
2917
- " -novconfig : Don't bring up graphical UI on vproject errors.\n "
2918
- " -dump : Write debugging .txt files.\n "
2919
- " -dumpnormals : Write normals to debug files.\n "
2920
- " -dumptrace : Write ray-tracing environment to debug files.\n "
2921
- " -threads : Control the number of threads vbsp uses (defaults to the #\n "
2922
- " or processors on your machine).\n "
2923
- " -lights <file> : Load a lights file in addition to lights.rad and the\n "
2924
- " level lights file.\n "
2925
- " -noextra : Disable supersampling.\n "
2926
- " -debugextra : Places debugging data in lightmaps to visualize\n "
2927
- " supersampling.\n "
2928
- " -extrapasses # : How many extra passes supersampling passes to do (default 6), differences above this value are minimal.\n "
2929
- " -smooth # : Set the threshold for smoothing groups, in degrees\n "
2930
- " (default 45).\n "
2931
- " -dlightmap : Force direct lighting into different lightmap than\n "
2932
- " radiosity.\n "
2933
- " -stoponexit : Wait for a keypress on exit.\n "
2934
- " -mpi_pw <pw> : Use a password to choose a specific set of VMPI workers.\n "
2935
- " -nodetaillight : Don't light detail props.\n "
2936
- " -centersamples : Move sample centers.\n "
2937
- " -luxeldensity # : Rescale all luxels by the specified amount (default: 1.0).\n "
2938
- " The number specified must be less than 1.0 or it will be\n "
2939
- " ignored.\n "
2940
- " -loghash : Log the sample hash table to samplehash.txt.\n "
2941
- " -onlydetail : Only light detail props and per-leaf lighting.\n "
2942
- " -maxdispsamplesize # : Set max displacement sample size (default: 512).\n "
2943
- " -softsun <n> : Treat the sun as an area light source of size <n> degrees."
2944
- " Produces soft shadows.\n "
2945
- " Recommended values are between 0 and 5 (default: 0).\n "
2946
- " -sunSamplesAreaLight # : Set max number of samples from the light_enviroment (default: 1024).\n "
2947
- " -FullMinidumps : Write large minidumps on crash.\n "
2948
- " -chop : Smallest number of luxel widths for a bounce patch, used on edges\n "
2949
- " -maxchop : Coarsest allowed number of luxel widths for a patch, used in face interiors\n "
2942
+ " -novconfig : Don't bring up graphical UI on vproject errors.\n "
2943
+ " -dump : Write debugging .txt files.\n "
2944
+ " -dumpnormals : Write normals to debug files.\n "
2945
+ " -dumptrace : Write ray-tracing environment to debug files.\n "
2946
+ " -threads : Control the number of threads vbsp uses (defaults to the #\n "
2947
+ " or processors on your machine).\n "
2948
+ " -lights <file> : Load a lights file in addition to lights.rad and the\n "
2949
+ " level lights file.\n "
2950
+ " -noextra : Disable supersampling.\n "
2951
+ " -debugextra : Places debugging data in lightmaps to visualize\n "
2952
+ " supersampling.\n "
2953
+ " -extrapasses # : How many extra passes supersampling passes to do (default 6), differences above this value are minimal.\n "
2954
+ " -smooth # : Set the threshold for smoothing groups, in degrees\n "
2955
+ " (default 45).\n "
2956
+ " -dlightmap : Force direct lighting into different lightmap than\n "
2957
+ " radiosity.\n "
2958
+ " -stoponexit : Wait for a keypress on exit.\n "
2959
+ " -mpi_pw <pw> : Use a password to choose a specific set of VMPI workers.\n "
2960
+ " -nodetaillight : Don't light detail props.\n "
2961
+ " -centersamples : Move sample centers.\n "
2962
+ " -luxeldensity # : Rescale all luxels by the specified amount (default: 1.0).\n "
2963
+ " The number specified must be less than 1.0 or it will be\n "
2964
+ " ignored.\n "
2965
+ " -loghash : Log the sample hash table to samplehash.txt.\n "
2966
+ " -onlydetail : Only light detail props and per-leaf lighting.\n "
2967
+ " -maxdispsamplesize # : Set max displacement sample size (default: 512).\n "
2968
+ " -softsun <n> : Treat the sun as an area light source of size <n> degrees."
2969
+ " Produces soft shadows.\n "
2970
+ " Recommended values are between 0 and 5 (default: 0).\n "
2971
+ " -sunSamplesAreaLight # : Set max number of samples from the light_enviroment (default: 1024).\n "
2972
+ " -FullMinidumps : Write large minidumps on crash.\n "
2973
+ " -chop : Smallest number of luxel widths for a bounce patch, used on edges. \n "
2974
+ " -maxchop : Coarsest allowed number of luxel widths for a patch, used in face interiors. \n "
2950
2975
" \n "
2951
- " -LargeDispSampleRadius : This can be used if there are splotches of bounced light\n "
2952
- " on terrain. The compile will take longer, but it will gather\n "
2953
- " light across a wider area.\n "
2954
- " -StaticPropLighting : generate backed static prop vertex lighting\n "
2955
- " -StaticPropPolys : Perform shadow tests of static props at polygon precision\n "
2956
- " -OnlyStaticProps : Only perform direct static prop lighting (vrad debug option)\n "
2957
- " -StaticPropNormals : when lighting static props, just show their normal vector\n "
2958
- " -textureshadows : Allows texture alpha channels to block light - rays intersecting alpha surfaces will sample the texture\n "
2959
- " -noskyboxrecurse : Turn off recursion into 3d skybox (skybox shadows on world)\n "
2960
- " -nossprops : Globally disable self-shadowing on static props\n "
2976
+ " -LargeDispSampleRadius : This can be used if there are splotches of bounced light\n "
2977
+ " on terrain. The compile will take longer, but it will gather\n "
2978
+ " light across a wider area.\n "
2979
+ " -StaticPropLighting : Generate backed static prop vertex lighting.\n "
2980
+ " -StaticPropPolys : Perform shadow tests of static props at polygon precision.\n "
2981
+ " -StaticPropIndirectMode : Override prop indirect lighting algorithm (0 - Balanced [CS:GO], 1 - Dark [SteamPipe], 2 - Bright [Orangebox]).\n "
2982
+ " -OnlyStaticProps : Only perform direct static prop lighting (vrad debug option).\n "
2983
+ " -StaticPropNormals : When lighting static props, just show their normal vector.\n "
2984
+ " -textureshadows : Allows texture alpha channels to block light - rays intersecting alpha surfaces will sample the texture.\n "
2985
+ " -noskyboxrecurse : Turn off recursion into 3d skybox (skybox shadows on world).\n "
2986
+ " -nossprops : Globally disable self-shadowing on static props.\n "
2961
2987
" \n "
2962
2988
#if 1 // Disabled for the initial SDK release with VMPI so we can get feedback from selected users.
2963
2989
);
2964
2990
#else
2965
- " -mpi_ListParams : Show a list of VMPI parameters.\n"
2991
+ " -mpi_ListParams : Show a list of VMPI parameters.\n"
2966
2992
"\n"
2967
2993
);
2968
2994
0 commit comments