You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add enableDirectLight option to MaterialX Viewer (#2773)
This PR adds a command-line flag to disable direct lighting, so scenes can be rendered purely with image-based lighting. This makes it easier to compare to other environments where direct lighting from environment maps is not available.
Copy file name to clipboardExpand all lines: source/MaterialXView/Main.cpp
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ const std::string options =
30
30
" --envSampleCount [INTEGER] Specify the environment sample count (defaults to 16)\n"
31
31
" --envLightIntensity [FLOAT] Specify the environment light intensity (defaults to 1)\n"
32
32
" --lightRotation [FLOAT] Specify the rotation in degrees of the lighting environment about the Y axis (defaults to 0)\n"
33
+
" --enableDirectLight [BOOLEAN] Specify whether direct lighting is enabled (defaults to true)\n"
33
34
" --shadowMap [BOOLEAN] Specify whether shadow mapping is enabled (defaults to true)\n"
34
35
" --path [FILEPATH] Specify an additional data search path location (e.g. '/projects/MaterialX'). This absolute path will be queried when locating data libraries, XInclude references, and referenced images.\n"
35
36
" --library [FILEPATH] Specify an additional data library folder (e.g. 'vendorlib', 'studiolib'). This relative path will be appended to each location in the data search path when loading data libraries.\n"
@@ -91,6 +92,7 @@ int main(int argc, char* const argv[])
91
92
int envSampleCount = mx::DEFAULT_ENV_SAMPLE_COUNT;
92
93
float envLightIntensity = 1.0f;
93
94
float lightRotation = 0.0f;
95
+
bool enableDirectLight = true;
94
96
bool shadowMap = true;
95
97
DocumentModifiers modifiers;
96
98
int screenWidth = 1280;
@@ -172,6 +174,10 @@ int main(int argc, char* const argv[])
0 commit comments