Enable fog on weather particles

openmw-37
scrawl 9 years ago
parent fd1ccd21ff
commit ad016da31d

@ -1457,8 +1457,10 @@ void SkyManager::setWeather(const WeatherResult& weather)
if (!mParticleNode) if (!mParticleNode)
{ {
mParticleNode = new osg::PositionAttitudeTransform; mParticleNode = new osg::PositionAttitudeTransform;
mParticleNode->getOrCreateStateSet()->setRenderBinDetails(RenderBin_Default, "RenderBin"); osg::StateSet* particleStateSet = mParticleNode->getOrCreateStateSet();
mParticleNode->getOrCreateStateSet()->setNestRenderBins(false); particleStateSet->setRenderBinDetails(RenderBin_Default, "RenderBin");
particleStateSet->setNestRenderBins(false);
particleStateSet->setMode(GL_FOG, osg::StateAttribute::ON);
mRootNode->addChild(mParticleNode); mRootNode->addChild(mParticleNode);
} }
mParticleEffect = mSceneManager->createInstance(mCurrentParticleEffect, mParticleNode); mParticleEffect = mSceneManager->createInstance(mCurrentParticleEffect, mParticleNode);

Loading…
Cancel
Save