diff --git a/apps/openmw/mwrender/skyutil.cpp b/apps/openmw/mwrender/skyutil.cpp index 3c2cd1c6e9..5971e50571 100644 --- a/apps/openmw/mwrender/skyutil.cpp +++ b/apps/openmw/mwrender/skyutil.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -794,7 +795,8 @@ namespace MWRender // Disable writing to the color buffer. We are using this geometry for visibility tests only. osg::ref_ptr 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);