mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 05:45:33 +00:00
Allow to do not reflect terrain
This commit is contained in:
parent
00ab552184
commit
9398117ea7
5 changed files with 20 additions and 17 deletions
|
@ -260,7 +260,7 @@ namespace MWGui
|
|||
mWaterTextureSize->setIndexSelected(2);
|
||||
|
||||
int waterReflectionDetail = Settings::Manager::getInt("reflection detail", "Water");
|
||||
waterReflectionDetail = std::min(3, std::max(0, waterReflectionDetail));
|
||||
waterReflectionDetail = std::min(4, std::max(0, waterReflectionDetail));
|
||||
mWaterReflectionDetail->setIndexSelected(waterReflectionDetail);
|
||||
|
||||
mWindowBorderButton->setEnabled(!Settings::Manager::getBool("fullscreen", "Video"));
|
||||
|
@ -344,7 +344,7 @@ namespace MWGui
|
|||
|
||||
void SettingsWindow::onWaterReflectionDetailChanged(MyGUI::ComboBox* _sender, size_t pos)
|
||||
{
|
||||
unsigned int level = std::min((unsigned int)3, (unsigned int)pos);
|
||||
unsigned int level = std::min((unsigned int)4, (unsigned int)pos);
|
||||
Settings::Manager::setInt("reflection detail", "Water", level);
|
||||
apply();
|
||||
}
|
||||
|
|
|
@ -316,13 +316,14 @@ public:
|
|||
setSmallFeatureCullingPixelSize(Settings::Manager::getInt("small feature culling pixel size", "Water"));
|
||||
setName("ReflectionCamera");
|
||||
|
||||
unsigned int reflectionDetail = Settings::Manager::getInt("reflection detail", "Water");
|
||||
reflectionDetail = std::max((unsigned int)isInterior, reflectionDetail);
|
||||
int reflectionDetail = Settings::Manager::getInt("reflection detail", "Water");
|
||||
reflectionDetail = std::min(4, std::max(isInterior ? 2 : 0, reflectionDetail));
|
||||
unsigned int extraMask = 0;
|
||||
if(reflectionDetail >= 1) extraMask |= Mask_Static;
|
||||
if(reflectionDetail >= 2) extraMask |= Mask_Effect|Mask_ParticleSystem|Mask_Object;
|
||||
if(reflectionDetail >= 3) extraMask |= Mask_Actor;
|
||||
setCullMask(Mask_Scene|Mask_Terrain|Mask_Sky|Mask_Player|Mask_Lighting|extraMask);
|
||||
if(reflectionDetail >= 1) extraMask |= Mask_Terrain;
|
||||
if(reflectionDetail >= 2) extraMask |= Mask_Static;
|
||||
if(reflectionDetail >= 3) extraMask |= Mask_Effect|Mask_ParticleSystem|Mask_Object;
|
||||
if(reflectionDetail >= 4) extraMask |= Mask_Player|Mask_Actor;
|
||||
setCullMask(Mask_Scene|Mask_Sky|Mask_Lighting|extraMask);
|
||||
setNodeMask(Mask_RenderToTexture);
|
||||
|
||||
unsigned int rttSize = Settings::Manager::getInt("rtt size", "Water");
|
||||
|
|
|
@ -62,17 +62,18 @@ reflection detail
|
|||
--------------
|
||||
|
||||
:Type: integer
|
||||
:Range: 0, 1, 2, 3
|
||||
:Default: 1
|
||||
:Range: 0, 1, 2, 3, 4
|
||||
:Default: 2
|
||||
|
||||
Controls what kinds of things are rendered in water reflections.
|
||||
|
||||
0: only terrain and the sky are reflected (acts like level 1 in interiors)
|
||||
1: statics, activators, and doors are also reflected
|
||||
2: items, containers, and particles are also reflected
|
||||
3: actors are also reflected
|
||||
0: only sky is reflected
|
||||
1: terrain is also reflected
|
||||
2: statics, activators, and doors are also reflected
|
||||
3: items, containers, and particles are also reflected
|
||||
4: actors are also reflected
|
||||
|
||||
The player is always reflected in third-person mode.
|
||||
In interiors the lowest level is 2.
|
||||
This setting can be changed ingame with the "Reflection shader detail" dropdown under the Water tab of the Video panel in the Options menu.
|
||||
|
||||
small feature culling pixel size
|
||||
|
|
|
@ -429,10 +429,11 @@
|
|||
</Widget>
|
||||
<Widget type="HBox" skin="" position="4 56 350 24">
|
||||
<Widget type="ComboBox" skin="MW_ComboBox" position="0 0 115 24" align="Left Top" name="WaterReflectionDetail">
|
||||
<Property key="AddItem" value="Off"/>
|
||||
<Property key="AddItem" value="Terrain"/>
|
||||
<Property key="AddItem" value="World"/>
|
||||
<Property key="AddItem" value="Objects"/>
|
||||
<Property key="AddItem" value="Everything"/>
|
||||
<Property key="AddItem" value="Actors"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedTextBox" skin="SandText" position="64 4 90 16" align="Left Top">
|
||||
<Property key="Caption" value="Reflection shader detail"/>
|
||||
|
|
|
@ -463,7 +463,7 @@ rtt size = 512
|
|||
refraction = false
|
||||
|
||||
# Draw objects on water reflections.
|
||||
reflection detail = 1
|
||||
reflection detail = 2
|
||||
|
||||
# Overrides the value in '[Camera] small feature culling pixel size' specifically for water reflection/refraction textures.
|
||||
small feature culling pixel size = 20.0
|
||||
|
|
Loading…
Reference in a new issue