Fix the node masks of water cameras being reset (Bug #2984)

Node mask needs to remain Mask_RenderToTexture so the raytesting visitor won't go through the reflection graph.
openmw-37
scrawl 9 years ago
parent 93f4d31cf9
commit 7b817ba010

@ -602,12 +602,12 @@ void Water::update(float dt)
void Water::updateVisible()
{
unsigned int mask = mEnabled && mToggled ? ~0 : 0;
mWaterNode->setNodeMask(mask);
bool visible = mEnabled && mToggled;
mWaterNode->setNodeMask(visible ? ~0 : 0);
if (mRefraction)
mRefraction->setNodeMask(mask);
mRefraction->setNodeMask(visible ? Mask_RenderToTexture : 0);
if (mReflection)
mReflection->setNodeMask(mask);
mReflection->setNodeMask(visible ? Mask_RenderToTexture : 0);
}
bool Water::toggle()

Loading…
Cancel
Save