|
|
@ -1,5 +1,6 @@
|
|
|
|
#include "groundcover.hpp"
|
|
|
|
#include "groundcover.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <osg/AlphaFunc>
|
|
|
|
#include <osg/Geometry>
|
|
|
|
#include <osg/Geometry>
|
|
|
|
#include <osg/VertexAttribDivisor>
|
|
|
|
#include <osg/VertexAttribDivisor>
|
|
|
|
|
|
|
|
|
|
|
@ -265,6 +266,9 @@ namespace MWRender
|
|
|
|
group->addChild(node);
|
|
|
|
group->addChild(node);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Force a unified alpha handling instead of data from meshes
|
|
|
|
|
|
|
|
osg::ref_ptr<osg::AlphaFunc> alpha = new osg::AlphaFunc(osg::AlphaFunc::GEQUAL, 128.f / 255.f);
|
|
|
|
|
|
|
|
group->getOrCreateStateSet()->setAttributeAndModes(alpha.get(), osg::StateAttribute::ON);
|
|
|
|
group->getBound();
|
|
|
|
group->getBound();
|
|
|
|
group->setNodeMask(Mask_Groundcover);
|
|
|
|
group->setNodeMask(Mask_Groundcover);
|
|
|
|
mSceneManager->recreateShaders(group, "groundcover", false, true);
|
|
|
|
mSceneManager->recreateShaders(group, "groundcover", false, true);
|
|
|
|