forked from mirror/openmw-tes3mp
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.
This commit is contained in:
parent
93f4d31cf9
commit
7b817ba010
1 changed files with 4 additions and 4 deletions
|
@ -602,12 +602,12 @@ void Water::update(float dt)
|
||||||
|
|
||||||
void Water::updateVisible()
|
void Water::updateVisible()
|
||||||
{
|
{
|
||||||
unsigned int mask = mEnabled && mToggled ? ~0 : 0;
|
bool visible = mEnabled && mToggled;
|
||||||
mWaterNode->setNodeMask(mask);
|
mWaterNode->setNodeMask(visible ? ~0 : 0);
|
||||||
if (mRefraction)
|
if (mRefraction)
|
||||||
mRefraction->setNodeMask(mask);
|
mRefraction->setNodeMask(visible ? Mask_RenderToTexture : 0);
|
||||||
if (mReflection)
|
if (mReflection)
|
||||||
mReflection->setNodeMask(mask);
|
mReflection->setNodeMask(visible ? Mask_RenderToTexture : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Water::toggle()
|
bool Water::toggle()
|
||||||
|
|
Loading…
Reference in a new issue