Commit 5f0f2f0f authored by psi29a's avatar psi29a
Browse files

rename to better reflect what is going on per AnyOldName3 comment; added none option

parent aca223f6
......@@ -144,9 +144,9 @@ bool Launcher::GraphicsPage::loadSettings()
if (mEngineSettings.getBool("enable indoor shadows", "Shadows"))
QString(tr(mEngineSettings.getString("near far computation", "Shadows").c_str()))));
QString(tr(mEngineSettings.getString("compute scene bounds", "Shadows").c_str()))));
int shadowDistLimit = mEngineSettings.getInt("maximum shadow map distance", "Shadows");
if (shadowDistLimit > 0)
......@@ -267,9 +267,9 @@ void Launcher::GraphicsPage::saveSettings()
if (cShadowRes != mEngineSettings.getInt("shadow map resolution", "Shadows"))
mEngineSettings.setInt("shadow map resolution", "Shadows", cShadowRes);
auto cShadowNearFarMode = shadowNearFarComputationComboBox->currentText().toStdString();
if (cShadowNearFarMode != mEngineSettings.getString("near far computation", "Shadows"))
mEngineSettings.setString("near far computation", "Shadows", cShadowNearFarMode);
auto cComputeSceneBounds = shadowComputeSceneBoundsComboBox->currentText().toStdString();
if (cComputeSceneBounds != mEngineSettings.getString("compute scene bounds", "Shadows"))
mEngineSettings.setString("compute scene bounds", "Shadows", cComputeSceneBounds);
QStringList Launcher::GraphicsPage::getAvailableResolutions(int screen)
......@@ -40,10 +40,10 @@ namespace SceneUtil
mShadowSettings->setMinimumShadowMapNearFarRatio(Settings::Manager::getFloat("minimum lispsm near far ratio", "Shadows"));
std::string computeNearFarMode = Settings::Manager::getString("near far computation", "Shadows");
if (Misc::StringUtils::lowerCase(computeNearFarMode) == "primitives")
std::string computeSceneBounds = Settings::Manager::getString("compute scene bounds", "Shadows");
if (Misc::StringUtils::lowerCase(computeSceneBounds) == "primitives")
else if (Misc::StringUtils::lowerCase(computeSceneBounds) == "bounds")
int mapres = Settings::Manager::getInt("shadow map resolution", "Shadows");
......@@ -80,15 +80,15 @@ enable debug overlay
Enable or disable the debug overlay to see the area covered by each shadow map.
This setting is only recommended for developers, bug reporting and advanced users performing fine-tuning of shadow settings.
near far computation
compute scene bounds
:Type: string
:Range: primitives|bounds
:Range: primitives|bounds|none
:Default: bounding volumes
Two different ways to make better use of shadow map(s) by making them cover a smaller area.
While primitives give better shadows at expense of more CPU, bounds gives better performance overall but with lower quality shadows.
While primitives give better shadows at expense of more CPU, bounds gives better performance overall but with lower quality shadows. There is also the ability to disable this computation with none.
shadow map resolution
......@@ -806,7 +806,7 @@ enable debug hud = false
enable debug overlay = false
# Used to set the type of tight scene bound calculation method to be used by the shadow map that covers a smaller area. "bounds" (default) is less precise shadows but better performance or "primitives" for more precise shadows at expense of CPU.
near far computation = bounds
compute scene bounds = bounds
# How large to make the shadow map(s). Higher values increase GPU load, but can produce better-looking results. Power-of-two values may turn out to be faster on some GPU/driver combinations.
shadow map resolution = 1024
......@@ -253,17 +253,17 @@
<item row="5" column="0">
<widget class="QLabel" name="shadowNearFarComputationLabel">
<widget class="QLabel" name="shadowComputeSceneBoundsLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Type of "near far plane" computation method to be used. Bounding Volumes (default) for better performance, Primitives for better looking shadows or none.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Type of "compute scene bounds" computation method to be used. Bounds (default) for good balance between performance and shadow quality, primitives for better looking shadows or none for no computation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<property name="text">
<string>Shadow Near Far Computation Method:</string>
<item row="5" column="1">
<widget class="QComboBox" name="shadowNearFarComputationComboBox">
<item row="5" column="1">compute scene bounds
<widget class="QComboBox" name="shadowComputeSceneBoundsComboBox">
<property name="text">
......@@ -274,6 +274,11 @@
<property name="text">
<item row="6" column="0">
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment