mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 10:21:09 +00:00
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
@ -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…
x
Reference in New Issue
Block a user