From 7f89bb273a1d8d0c807863d955acc6b1618353bd Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 18 Feb 2016 19:31:25 +0100 Subject: [PATCH] Add 'reflect actors' setting for the water shader, default off --- apps/openmw/mwrender/water.cpp | 4 +++- files/mygui/openmw_settings_window.layout | 10 ++++++++++ files/settings-default.cfg | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index dba85aeb7..e20590ecb 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -375,7 +375,9 @@ public: setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); setReferenceFrame(osg::Camera::RELATIVE_RF); - setCullMask(Mask_Effect|Mask_Scene|Mask_Terrain|Mask_Actor|Mask_ParticleSystem|Mask_Sky|Mask_Player|Mask_Lighting); + bool reflectActors = Settings::Manager::getBool("reflect actors", "Water"); + + setCullMask(Mask_Effect|Mask_Scene|Mask_Terrain|Mask_ParticleSystem|Mask_Sky|Mask_Player|Mask_Lighting|(reflectActors ? Mask_Actor : 0)); setNodeMask(Mask_RenderToTexture); unsigned int rttSize = Settings::Manager::getInt("rtt size", "Water"); diff --git a/files/mygui/openmw_settings_window.layout b/files/mygui/openmw_settings_window.layout index cf7fe1be7..5d6d817d6 100644 --- a/files/mygui/openmw_settings_window.layout +++ b/files/mygui/openmw_settings_window.layout @@ -396,6 +396,16 @@ + + + + + + + + + + diff --git a/files/settings-default.cfg b/files/settings-default.cfg index c6c97546e..a5e750d4d 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -274,6 +274,9 @@ rtt size = 512 # Enable refraction which affects visibility through water plane. refraction = false +# Draw NPCs and creatures on water reflections. +reflect actors = false + [Objects] # Enable shaders for objects other than water. Unused.