1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-05 17:49:42 +00:00

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

Fix sunglare on Mesa

Closes #5906

See merge request OpenMW/openmw!665
This commit is contained in:
psi29a 2021-03-17 09:27:25 +00:00
commit cac7461324
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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.