1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-19 12:40:49 +00:00

Merge branch 'sun_writes' into 'master'

Sun flickering on Mac (part of #7052)

See merge request OpenMW/openmw!2768
This commit is contained in:
psi29a 2023-02-26 15:32:07 +00:00
commit 2aac6abb85

View File

@ -5,6 +5,7 @@
#include <osg/AlphaFunc>
#include <osg/BlendFunc>
#include <osg/ColorMask>
#include <osg/ColorMaski>
#include <osg/Depth>
#include <osg/Geometry>
#include <osg/Material>
@ -798,7 +799,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);