1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 12:09:50 +00:00

Merge branch 'helios-stop-blinking' into 'openmw-48'

!2768 for 0.48.0

See merge request OpenMW/openmw!2793
This commit is contained in:
psi29a 2023-03-03 19:00:49 +00:00
commit a7116aacbc

View file

@ -10,6 +10,7 @@
#include <osg/TexMat>
#include <osg/OcclusionQueryNode>
#include <osg/ColorMask>
#include <osg/ColorMaski>
#include <osg/BlendFunc>
#include <osg/AlphaFunc>
#include <osg/observer_ptr>
@ -794,7 +795,8 @@ namespace MWRender
// Disable writing to the color buffer. We are using this geometry for visibility tests only.
osg::ref_ptr<osg::ColorMask> colormask = new osg::ColorMask(0, 0, 0, 0);
stateset->setAttributeAndModes(colormask);
if (sceneManager.getSupportsNormalsRT())
stateset->setAttributeAndModes(new osg::ColorMaski(1, false, false, false, false));
mTransform->addChild(queryNode);
mOcclusionQueryVisiblePixels = createOcclusionQueryNode(queryNode, true);