From 1808b8567e5cb5eeb806c8d9e7993ba51c4e866e Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 1 Feb 2017 05:55:33 +0100 Subject: [PATCH] Add 'small feature culling pixel size' setting specifically for water RTTs, by default set higher than the one in [Camera] --- apps/openmw/mwrender/water.cpp | 2 ++ docs/source/openmw-mods/settings/water.rst | 17 ++++++++++++++++- files/settings-default.cfg | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index b99c128a3..cb5f68943 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -222,6 +222,7 @@ public: setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); setReferenceFrame(osg::Camera::RELATIVE_RF); + setSmallFeatureCullingPixelSize(Settings::Manager::getInt("small feature culling pixel size", "Water")); setCullMask(Mask_Effect|Mask_Scene|Mask_Terrain|Mask_Actor|Mask_ParticleSystem|Mask_Sky|Mask_Sun|Mask_Player|Mask_Lighting); setNodeMask(Mask_RenderToTexture); @@ -303,6 +304,7 @@ public: setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); setReferenceFrame(osg::Camera::RELATIVE_RF); + setSmallFeatureCullingPixelSize(Settings::Manager::getInt("small feature culling pixel size", "Water")); bool reflectActors = Settings::Manager::getBool("reflect actors", "Water"); diff --git a/docs/source/openmw-mods/settings/water.rst b/docs/source/openmw-mods/settings/water.rst index b2b9a00c2..379da1de2 100644 --- a/docs/source/openmw-mods/settings/water.rst +++ b/docs/source/openmw-mods/settings/water.rst @@ -40,4 +40,19 @@ This boolean setting enables the refraction rendering feature of the water shade This setting has no effect if the shader setting is false. -The default setting is false. This setting can be toggled with the Refraction button in the Water tab of the Video panel of the Options menu. \ No newline at end of file +The default setting is false. This setting can be toggled with the Refraction button in the Water tab of the Video panel of the Options menu. + +small feature culling pixel size +-------------------------------- + +:Type: floating point +:Range: > 0 +:Default: 20.0 + +Controls the cutoff in pixels for small feature culling - see the 'Camera' section for more details, however this setting in the 'Water' section applies specifically to objects rendered in water reflection and refraction textures. + +The setting 'rtt size' interacts with this setting because it controls how large a pixel on the water texture (technically called a texel) is in pixels on the screen. + +This setting will have no effect if the shader setting is false, or the 'small feature culling' (in the 'Camera' section) is disabled. + +This setting can only be configured by editing the settings configuration file. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 6b98d5599..d9d40bb0b 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -340,6 +340,9 @@ refraction = false # Draw NPCs and creatures on water reflections. reflect actors = false +# Overrides the value in '[Camera] small feature culling pixel size' specifically for water reflection/refraction textures. +small feature culling pixel size = 20.0 + [Windows] # Location and sizes of windows as a fraction of the OpenMW window or