Merge branch 'fix-mesa-sunglare' into 'master'

Fix sunglare on Mesa

Closes #5906

See merge request OpenMW/openmw!665
pull/593/head
psi29a 4 years ago
commit cac7461324

@ -110,6 +110,7 @@
Bug #5877: Effects appearing with empty icon
Bug #5899: Visible modal windows and dropdowns crashing game on exit
Bug #5902: NiZBufferProperty is unable to disable the depth test
Bug #5906: Sunglare doesn't work with Mesa drivers and AMD GPUs
Feature #390: 3rd person look "over the shoulder"
Feature #832: OpenMW-CS: Handle deleted references
Feature #1536: Show more information about level on menu

@ -497,8 +497,6 @@ public:
// 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, osg::StateAttribute::ON);
osg::ref_ptr<osg::PolygonOffset> po (new osg::PolygonOffset( -1., -1. ));
stateset->setAttributeAndModes(po, osg::StateAttribute::ON);
mTransform->addChild(queryNode);
@ -595,7 +593,7 @@ private:
if (queryVisible)
{
osg::ref_ptr<osg::Depth> depth (new osg::Depth);
depth->setFunction(osg::Depth::LESS);
depth->setFunction(osg::Depth::LEQUAL);
// This is a trick to make fragments written by the query always use the maximum depth value,
// without having to retrieve the current far clipping distance.
// We want the sun glare to be "infinitely" far away.

Loading…
Cancel
Save