1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-09 21:44:54 +00:00

settings update and launcher option

This commit is contained in:
glassmancody.info 2021-11-01 09:26:50 -07:00
parent 40b6bbbdf3
commit 4461366761
6 changed files with 41 additions and 20 deletions

View File

@ -78,6 +78,7 @@
Feature #6017: Separate persistent and temporary cell references when saving Feature #6017: Separate persistent and temporary cell references when saving
Feature #6032: Reverse-z depth buffer Feature #6032: Reverse-z depth buffer
Feature #6078: First person should not clear depth buffer Feature #6078: First person should not clear depth buffer
Feature #6128: Soft Particles
Feature #6161: Refactor Sky to use shaders and GLES/GL3 friendly Feature #6161: Refactor Sky to use shaders and GLES/GL3 friendly
Feature #6162: Refactor GUI to use shaders and to be GLES and GL3+ friendly Feature #6162: Refactor GUI to use shaders and to be GLES and GL3+ friendly
Feature #6199: Support FBO Rendering Feature #6199: Support FBO Rendering

View File

@ -117,6 +117,7 @@ bool Launcher::AdvancedPage::loadSettings()
loadSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders"); loadSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders");
loadSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders"); loadSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
loadSettingBool(radialFogCheckBox, "radial fog", "Shaders"); loadSettingBool(radialFogCheckBox, "radial fog", "Shaders");
loadSettingBool(softParticlesCheckBox, "soft particles", "Shaders");
loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
connect(animSourcesCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotAnimSourcesToggled(bool))); connect(animSourcesCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotAnimSourcesToggled(bool)));
loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
@ -270,6 +271,7 @@ void Launcher::AdvancedPage::saveSettings()
saveSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders"); saveSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders");
saveSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders"); saveSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
saveSettingBool(radialFogCheckBox, "radial fog", "Shaders"); saveSettingBool(radialFogCheckBox, "radial fog", "Shaders");
saveSettingBool(softParticlesCheckBox, "soft particles", "Shaders");
saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");

View File

@ -557,19 +557,26 @@ namespace Shader
updateAddedState(*writableUserData, addedState); updateAddedState(*writableUserData, addedState);
} }
if (auto partsys = dynamic_cast<osgParticle::ParticleSystem*>(&node)) bool softParticles = false;
{
defineMap["softParticles"] = "1";
auto depth = SceneUtil::createDepth(); if (mOpaqueDepthTex)
depth->setWriteMask(false); {
writableStateSet->setAttributeAndModes(depth, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); auto partsys = dynamic_cast<osgParticle::ParticleSystem*>(&node);
writableStateSet->addUniform(new osg::Uniform("particleSize", partsys->getDefaultParticleTemplate().getSizeRange().maximum));
writableStateSet->addUniform(new osg::Uniform("opaqueDepthTex", 2)); if (partsys)
writableStateSet->setTextureAttributeAndModes(2, mOpaqueDepthTex, osg::StateAttribute::ON); {
softParticles = true;
auto depth = SceneUtil::createDepth();
depth->setWriteMask(false);
writableStateSet->setAttributeAndModes(depth, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
writableStateSet->addUniform(new osg::Uniform("particleSize", partsys->getDefaultParticleTemplate().getSizeRange().maximum));
writableStateSet->addUniform(new osg::Uniform("opaqueDepthTex", 2));
writableStateSet->setTextureAttributeAndModes(2, mOpaqueDepthTex, osg::StateAttribute::ON);
}
} }
else
defineMap["softParticles"] = "0"; defineMap["softParticles"] = softParticles ? "1" : "0";
std::string shaderPrefix; std::string shaderPrefix;
if (!node.getUserValue("shaderPrefix", shaderPrefix)) if (!node.getUserValue("shaderPrefix", shaderPrefix))

View File

@ -241,7 +241,7 @@ lighting` is on.
This setting has no effect if :ref:`lighting method` is 'legacy'. This setting has no effect if :ref:`lighting method` is 'legacy'.
minimum interior brightness minimum interior brightness
------------------------ ---------------------------
:Type: float :Type: float
:Range: 0.0-1.0 :Range: 0.0-1.0
@ -260,7 +260,7 @@ aforementioned changes in visuals.
This setting has no effect if :ref:`lighting method` is 'legacy'. This setting has no effect if :ref:`lighting method` is 'legacy'.
antialias alpha test antialias alpha test
--------------------------------------- --------------------
:Type: boolean :Type: boolean
:Range: True/False :Range: True/False
@ -271,14 +271,14 @@ This allows MSAA to work with alpha-tested meshes, producing better-looking edge
When MSAA is off, this setting will have no visible effect, but might have a performance cost. When MSAA is off, this setting will have no visible effect, but might have a performance cost.
soft particles soft particles
------------------------ --------------
:Type: boolean :Type: boolean
:Range: True/False :Range: True/False
:Default: False :Default: False
Enables soft particles for almost all particle effects, excluding precipitation. Enables soft particles for particle effects. This technique softens the
This technique softens the intersection between individual particles and other intersection between individual particles and other opaque geometry by blending
opaque geometry by blending between them. Note, this relies on overriding between them. Note, this relies on overriding specific properties of particle
specific properties of particle systems that potentially differ from the source systems that potentially differ from the source content, this setting may change
content, this setting may change the look of some particle systems. the look of some particle systems.

View File

@ -494,7 +494,8 @@ minimum interior brightness = 0.08
# When MSAA is off, this setting will have no visible effect, but might have a performance cost. # When MSAA is off, this setting will have no visible effect, but might have a performance cost.
antialias alpha test = false antialias alpha test = false
soft particles = true # Soften intersection of blended particle systems with opaque geometry
soft particles = false
[Input] [Input]

View File

@ -444,6 +444,16 @@
</property> </property>
</widget> </widget>
</item> </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>
</property>
<property name="text">
<string>Soft Particles</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>