mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 19:53:53 +00:00
Merge branch 'fog_settings' into 'master'
Add sky blending to launcher See merge request OpenMW/openmw!2118
This commit is contained in:
commit
dfea7a6d01
3 changed files with 128 additions and 50 deletions
|
@ -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,13 +434,12 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="radialFogCheckBox">
|
||||
<widget class="QCheckBox" name="antialiasAlphaTestCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>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.</p></body></html></string>
|
||||
<string><html><head/><body><p>Allows MSAA to work with alpha-tested meshes, producing better-looking edges without pixelation. Can negatively impact performance.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Radial fog</string>
|
||||
<string>Use anti-alias alpha testing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -454,13 +453,75 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="antialiasAlphaTestCheckBox">
|
||||
</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><html><head/><body><p>Allows MSAA to work with alpha-tested meshes, producing better-looking edges without pixelation. Can negatively impact performance.</p></body></html></string>
|
||||
<string><html><head/><body><p>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.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use anti-alias alpha testing</string>
|
||||
<string>Radial fog</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="exponentialFogCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Use exponential fog formula. By default, linear fog is used.</p></body></html></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><html><head/><body><p>Reduce visibility of clipping plane by blending objects with the sky.</p></body></html></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><html><head/><body><p>The fraction of the maximum distance at which blending with the sky starts.</p></body></html></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>
|
||||
|
|
Loading…
Reference in a new issue