Don't attempt to render weather particles on the refraction and reflection textures

openmw-37
scrawl 9 years ago
parent 209fa52883
commit 1cf1c944b7

@ -1374,6 +1374,7 @@ void SkyManager::createRain()
mRainFader = new RainFader; mRainFader = new RainFader;
mRainNode->addUpdateCallback(mRainFader); mRainNode->addUpdateCallback(mRainFader);
mRainNode->addCullCallback(mUnderwaterSwitch); mRainNode->addCullCallback(mUnderwaterSwitch);
mRainNode->setNodeMask(Mask_WeatherParticles);
mRootNode->addChild(mRainNode); mRootNode->addChild(mRainNode);
} }
@ -1515,6 +1516,7 @@ void SkyManager::setWeather(const WeatherResult& weather)
{ {
mParticleNode = new osg::PositionAttitudeTransform; mParticleNode = new osg::PositionAttitudeTransform;
mParticleNode->addCullCallback(mUnderwaterSwitch); mParticleNode->addCullCallback(mUnderwaterSwitch);
mParticleNode->setNodeMask(Mask_WeatherParticles);
mRootNode->addChild(mParticleNode); mRootNode->addChild(mParticleNode);
} }
mParticleEffect = mSceneManager->createInstance(mCurrentParticleEffect, mParticleNode); mParticleEffect = mSceneManager->createInstance(mCurrentParticleEffect, mParticleNode);

@ -15,21 +15,26 @@ namespace MWRender
Mask_Actor = (1<<3), Mask_Actor = (1<<3),
Mask_Player = (1<<4), Mask_Player = (1<<4),
Mask_Sky = (1<<5), Mask_Sky = (1<<5),
Mask_Sun = (1<<6), Mask_Water = (1<<6),
Mask_Water = (1<<7), Mask_Terrain = (1<<7),
Mask_SimpleWater = (1<<8), Mask_FirstPerson = (1<<8),
Mask_Terrain = (1<<9),
Mask_FirstPerson = (1<<10), // child of Sky
Mask_Sun = (1<<9),
Mask_WeatherParticles = (1<<10),
// child of Water
Mask_SimpleWater = (1<<11),
// top level masks // top level masks
Mask_Scene = (1<<11), Mask_Scene = (1<<12),
Mask_GUI = (1<<12), Mask_GUI = (1<<13),
// Set on a Geode // Set on a Geode
Mask_ParticleSystem = (1<<13), Mask_ParticleSystem = (1<<14),
// Set on cameras within the main scene graph // Set on cameras within the main scene graph
Mask_RenderToTexture = (1<<14) Mask_RenderToTexture = (1<<15)
// reserved: (1<<16) for SceneUtil::Mask_Lit // reserved: (1<<16) for SceneUtil::Mask_Lit
}; };

Loading…
Cancel
Save