mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 05:15:36 +00:00
fix sunglare flash, make sure all bound render targets have color masks set
This commit is contained in:
parent
7a52b9d1d8
commit
7fb4acaaf2
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include <osg/TexMat>
|
#include <osg/TexMat>
|
||||||
#include <osg/OcclusionQueryNode>
|
#include <osg/OcclusionQueryNode>
|
||||||
#include <osg/ColorMask>
|
#include <osg/ColorMask>
|
||||||
|
#include <osg/ColorMaski>
|
||||||
#include <osg/BlendFunc>
|
#include <osg/BlendFunc>
|
||||||
#include <osg/AlphaFunc>
|
#include <osg/AlphaFunc>
|
||||||
#include <osg/observer_ptr>
|
#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.
|
// 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…
Reference in a new issue