Add 'small feature culling pixel size' setting specifically for water RTTs, by default set higher than the one in [Camera]

pull/137/head
scrawl 8 years ago
parent fcb4129aee
commit 1808b8567e

@ -222,6 +222,7 @@ public:
setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
setReferenceFrame(osg::Camera::RELATIVE_RF); 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); setCullMask(Mask_Effect|Mask_Scene|Mask_Terrain|Mask_Actor|Mask_ParticleSystem|Mask_Sky|Mask_Sun|Mask_Player|Mask_Lighting);
setNodeMask(Mask_RenderToTexture); setNodeMask(Mask_RenderToTexture);
@ -303,6 +304,7 @@ public:
setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
setReferenceFrame(osg::Camera::RELATIVE_RF); setReferenceFrame(osg::Camera::RELATIVE_RF);
setSmallFeatureCullingPixelSize(Settings::Manager::getInt("small feature culling pixel size", "Water"));
bool reflectActors = Settings::Manager::getBool("reflect actors", "Water"); bool reflectActors = Settings::Manager::getBool("reflect actors", "Water");

@ -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. 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. 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.

@ -340,6 +340,9 @@ refraction = false
# Draw NPCs and creatures on water reflections. # Draw NPCs and creatures on water reflections.
reflect actors = false 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] [Windows]
# Location and sizes of windows as a fraction of the OpenMW window or # Location and sizes of windows as a fraction of the OpenMW window or

Loading…
Cancel
Save