mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 19:21:04 +00:00
fix sunglare flash, make sure all bound render targets have color masks set
This commit is contained in:
parent
5b2a2a4484
commit
fb5979312f
@ -5,6 +5,7 @@
|
|||||||
#include <osg/AlphaFunc>
|
#include <osg/AlphaFunc>
|
||||||
#include <osg/BlendFunc>
|
#include <osg/BlendFunc>
|
||||||
#include <osg/ColorMask>
|
#include <osg/ColorMask>
|
||||||
|
#include <osg/ColorMaski>
|
||||||
#include <osg/Depth>
|
#include <osg/Depth>
|
||||||
#include <osg/Geometry>
|
#include <osg/Geometry>
|
||||||
#include <osg/Material>
|
#include <osg/Material>
|
||||||
@ -798,7 +799,8 @@ namespace MWRender
|
|||||||
// Disable writing to the color buffer. We are using this geometry for visibility tests only.
|
// 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);
|
osg::ref_ptr<osg::ColorMask> colormask = new osg::ColorMask(0, 0, 0, 0);
|
||||||
stateset->setAttributeAndModes(colormask);
|
stateset->setAttributeAndModes(colormask);
|
||||||
|
if (sceneManager.getSupportsNormalsRT())
|
||||||
|
stateset->setAttributeAndModes(new osg::ColorMaski(1, false, false, false, false));
|
||||||
mTransform->addChild(queryNode);
|
mTransform->addChild(queryNode);
|
||||||
|
|
||||||
mOcclusionQueryVisiblePixels = createOcclusionQueryNode(queryNode, true);
|
mOcclusionQueryVisiblePixels = createOcclusionQueryNode(queryNode, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user