Add 'reflect actors' setting for the water shader, default off

move
scrawl 9 years ago
parent 6fb0022b35
commit 7f89bb273a

@ -375,7 +375,9 @@ public:
setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
setReferenceFrame(osg::Camera::RELATIVE_RF); 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); setNodeMask(Mask_RenderToTexture);
unsigned int rttSize = Settings::Manager::getInt("rtt size", "Water"); unsigned int rttSize = Settings::Manager::getInt("rtt size", "Water");

@ -396,6 +396,16 @@
<Property key="Caption" value="Texture quality"/> <Property key="Caption" value="Texture quality"/>
</Widget> </Widget>
</Widget> </Widget>
<Widget type="HBox" skin="" position="4 56 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 0 24 24" align="Left Top">
<UserString key="SettingCategory" value="Water"/>
<UserString key="SettingName" value="reflect actors"/>
<UserString key="SettingType" value="CheckButton"/>
</Widget>
<Widget type="AutoSizedTextBox" skin="SandText" position="28 4 79 16" align="Left Top">
<Property key="Caption" value="Reflect actors"/>
</Widget>
</Widget>
</Widget> </Widget>
</Widget> </Widget>

@ -274,6 +274,9 @@ rtt size = 512
# Enable refraction which affects visibility through water plane. # Enable refraction which affects visibility through water plane.
refraction = false refraction = false
# Draw NPCs and creatures on water reflections.
reflect actors = false
[Objects] [Objects]
# Enable shaders for objects other than water. Unused. # Enable shaders for objects other than water. Unused.

Loading…
Cancel
Save