Merge branch 'fog_settings' into 'master'

Add sky blending to launcher

See merge request OpenMW/openmw!2118
LTO-timing^2
AnyOldName3 3 years ago
commit dfea7a6d01

@ -117,7 +117,6 @@ bool Launcher::AdvancedPage::loadSettings()
loadSettingBool(autoUseTerrainNormalMapsCheckBox, "auto use terrain normal maps", "Shaders");
loadSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders");
loadSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
loadSettingBool(radialFogCheckBox, "radial fog", "Fog");
loadSettingBool(softParticlesCheckBox, "soft particles", "Shaders");
loadSettingBool(antialiasAlphaTestCheckBox, "antialias alpha test", "Shaders");
if (Settings::Manager::getInt("antialiasing", "Video") == 0) {
@ -151,6 +150,12 @@ bool Launcher::AdvancedPage::loadSettings()
loadSettingBool(postprocessLiveReloadCheckBox, "live reload", "Post Processing");
loadSettingBool(postprocessTransparentPostpassCheckBox, "transparent postpass", "Post Processing");
postprocessHDRTimeComboBox->setValue(Settings::Manager::getDouble("hdr exposure time", "Post Processing"));
connect(skyBlendingCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotSkyBlendingToggled(bool)));
loadSettingBool(radialFogCheckBox, "radial fog", "Fog");
loadSettingBool(exponentialFogCheckBox, "exponential fog", "Fog");
loadSettingBool(skyBlendingCheckBox, "sky blending", "Fog");
skyBlendingStartComboBox->setValue(Settings::Manager::getDouble("sky blending start", "Fog"));
}
// Audio
@ -302,6 +307,11 @@ void Launcher::AdvancedPage::saveSettings()
double hdrExposureTime = postprocessHDRTimeComboBox->value();
if (hdrExposureTime != Settings::Manager::getDouble("hdr exposure time", "Post Processing"))
Settings::Manager::setDouble("hdr exposure time", "Post Processing", hdrExposureTime);
saveSettingBool(radialFogCheckBox, "radial fog", "Fog");
saveSettingBool(exponentialFogCheckBox, "exponential fog", "Fog");
saveSettingBool(skyBlendingCheckBox, "sky blending", "Fog");
Settings::Manager::setDouble("sky blending start", "Fog", skyBlendingStartComboBox->value());
}
// Audio
@ -454,3 +464,9 @@ void Launcher::AdvancedPage::slotPostProcessToggled(bool checked)
postprocessHDRTimeComboBox->setEnabled(checked);
postprocessHDRTimeLabel->setEnabled(checked);
}
void Launcher::AdvancedPage::slotSkyBlendingToggled(bool checked)
{
skyBlendingStartComboBox->setEnabled(checked);
skyBlendingStartLabel->setEnabled(checked);
}

@ -30,6 +30,7 @@ namespace Launcher
void on_runScriptAfterStartupBrowseButton_clicked();
void slotAnimSourcesToggled(bool checked);
void slotPostProcessToggled(bool checked);
void slotSkyBlendingToggled(bool checked);
private:
Config::GameSettings &mGameSettings;

@ -434,17 +434,16 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="radialFogCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, the fog becomes thicker proportionally to your distance from the clipping plane set at the clipping distance, which causes distortion at the edges of the screen.
This setting makes the fog use the actual eye point distance (or so called Euclidean distance) to calculate the fog, which makes the fog look less artificial, especially if you have a wide FOV.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Radial fog</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="antialiasAlphaTestCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Allows MSAA to work with alpha-tested meshes, producing better-looking edges without pixelation. Can negatively impact performance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use anti-alias alpha testing</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="softParticlesCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enables soft particles for particle effects. This technique softens the intersection between individual particles and other opaque geometry by blending between them.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -454,19 +453,81 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="antialiasAlphaTestCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Allows MSAA to work with alpha-tested meshes, producing better-looking edges without pixelation. Can negatively impact performance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use anti-alias alpha testing</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="fogGroup">
<property name="title">
<string>Fog</string>
</property>
<layout class="QGridLayout" name="fogLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="radialFogCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By default, the fog becomes thicker proportionally to your distance from the clipping plane set at the clipping distance, which causes distortion at the edges of the screen.
This setting makes the fog use the actual eye point distance (or so called Euclidean distance) to calculate the fog, which makes the fog look less artificial, especially if you have a wide FOV.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Radial fog</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="exponentialFogCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use exponential fog formula. By default, linear fog is used.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Exponential fog</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="skyBlendingCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Reduce visibility of clipping plane by blending objects with the sky.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sky blending</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="skyBlendingStartLabel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Sky blending start</string>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The fraction of the maximum distance at which blending with the sky starts.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="skyBlendingStartComboBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.005000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="terrainGroup">
<property name="title">
@ -626,36 +687,36 @@
<item row="1" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="postprocessHDRTimeLabel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Controls how much eye adaptation can change from frame to frame. Smaller values makes for slower transitions.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>HDR exposure time</string>
</property>
</widget>
<widget class="QLabel" name="postprocessHDRTimeLabel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Controls how much eye adaptation can change from frame to frame. Smaller values makes for slower transitions.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>HDR exposure time</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="postprocessHDRTimeComboBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
</widget>
<widget class="QDoubleSpinBox" name="postprocessHDRTimeComboBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
</widget>
</item>
</layout>
</item>

Loading…
Cancel
Save