|
|
|
@ -306,7 +306,12 @@ public:
|
|
|
|
|
setUpdateCallback(new NoTraverseCallback);
|
|
|
|
|
|
|
|
|
|
// No need for fog here, we are already applying fog on the water surface itself as well as underwater fog
|
|
|
|
|
getOrCreateStateSet()->setMode(GL_FOG, osg::StateAttribute::OFF|osg::StateAttribute::OVERRIDE);
|
|
|
|
|
// assign large value to effectively turn off fog
|
|
|
|
|
// shaders don't respect glDisable(GL_FOG)
|
|
|
|
|
osg::ref_ptr<osg::Fog> fog (new osg::Fog);
|
|
|
|
|
fog->setStart(10000000);
|
|
|
|
|
fog->setEnd(10000000);
|
|
|
|
|
getOrCreateStateSet()->setAttributeAndModes(fog, osg::StateAttribute::OFF|osg::StateAttribute::OVERRIDE);
|
|
|
|
|
|
|
|
|
|
mClipCullNode = new ClipCullNode;
|
|
|
|
|
addChild(mClipCullNode);
|
|
|
|
|