mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-25 07:06:49 +00:00
Share fog state attributes
This commit is contained in:
parent
d7bd5e76ca
commit
713e741f9c
1 changed files with 2 additions and 0 deletions
|
@ -2603,6 +2603,7 @@ namespace NifOsg
|
||||||
fog->setMode(osg::Fog::LINEAR);
|
fog->setMode(osg::Fog::LINEAR);
|
||||||
fog->setColor(osg::Vec4f(fogprop->mColour, 1.f));
|
fog->setColor(osg::Vec4f(fogprop->mColour, 1.f));
|
||||||
fog->setDepth(fogprop->mFogDepth);
|
fog->setDepth(fogprop->mFogDepth);
|
||||||
|
fog = shareAttribute(fog);
|
||||||
stateset->setAttributeAndModes(fog, osg::StateAttribute::ON);
|
stateset->setAttributeAndModes(fog, osg::StateAttribute::ON);
|
||||||
// Intentionally ignoring radial fog flag
|
// Intentionally ignoring radial fog flag
|
||||||
// We don't really want to override the global setting
|
// We don't really want to override the global setting
|
||||||
|
@ -2614,6 +2615,7 @@ namespace NifOsg
|
||||||
fog->setMode(osg::Fog::LINEAR);
|
fog->setMode(osg::Fog::LINEAR);
|
||||||
fog->setStart(10000000);
|
fog->setStart(10000000);
|
||||||
fog->setEnd(10000000);
|
fog->setEnd(10000000);
|
||||||
|
fog = shareAttribute(fog);
|
||||||
stateset->setAttributeAndModes(fog, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE);
|
stateset->setAttributeAndModes(fog, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue