1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

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

This commit is contained in:
scrawl 2017-02-01 05:55:33 +01:00
parent fcb4129aee
commit 1808b8567e
3 changed files with 21 additions and 1 deletions

View file

@ -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");

View file

@ -41,3 +41,18 @@ 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.
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.

View file

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