mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
alphablending & billboardfix
Signed-off-by: Bret Curtis <psi29a@gmail.com>
This commit is contained in:
parent
4e2efb3cdb
commit
daa2761c2d
3 changed files with 42 additions and 38 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <osg/Notify>
|
||||
#include <osg/Timer>
|
||||
#include <osg/io_utils>
|
||||
#include <osg/Depth>
|
||||
|
||||
#include <osgUtil/TransformAttributeFunctor>
|
||||
#include <osgUtil/Statistics>
|
||||
|
@ -1543,6 +1544,12 @@ bool Optimizer::MergeGeometryVisitor::mergeGroup(osg::Group& group)
|
|||
geom->setUseVertexBufferObjects(true);
|
||||
geom->setUseDisplayList(false);
|
||||
}
|
||||
if (_alphaBlendingActive && _mergeAlphaBlending && !geom->getStateSet())
|
||||
{
|
||||
osg::Depth* d = new osg::Depth;
|
||||
d->setWriteMask(0);
|
||||
geom->getOrCreateStateSet()->setAttribute(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue