mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-14 23:05:57 -04:00
disable blending in second color attachment on water node
This commit is contained in:
parent
1a08565a20
commit
30a852bb88
@ -565,6 +565,8 @@ namespace MWRender
|
|||||||
else
|
else
|
||||||
createSimpleWaterStateSet(mWaterGeom, Fallback::Map::getFloat("Water_World_Alpha"));
|
createSimpleWaterStateSet(mWaterGeom, Fallback::Map::getFloat("Water_World_Alpha"));
|
||||||
|
|
||||||
|
mResourceSystem->getSceneManager()->setUpNormalsRTForStateSet(mWaterGeom->getOrCreateStateSet(), true);
|
||||||
|
|
||||||
updateVisible();
|
updateVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#include <osg/AlphaFunc>
|
#include <osg/AlphaFunc>
|
||||||
|
#include <osg/Capability>
|
||||||
#include <osg/ColorMaski>
|
#include <osg/ColorMaski>
|
||||||
#include <osg/Group>
|
#include <osg/Group>
|
||||||
#include <osg/Node>
|
#include <osg/Node>
|
||||||
@ -607,6 +608,9 @@ namespace Resource
|
|||||||
if (!getSupportsNormalsRT())
|
if (!getSupportsNormalsRT())
|
||||||
return;
|
return;
|
||||||
stateset->setAttributeAndModes(new osg::ColorMaski(1, enabled, enabled, enabled, enabled));
|
stateset->setAttributeAndModes(new osg::ColorMaski(1, enabled, enabled, enabled, enabled));
|
||||||
|
|
||||||
|
if (enabled)
|
||||||
|
stateset->setAttributeAndModes(new osg::Disablei(GL_BLEND, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Callback to read image files from the VFS.
|
/// @brief Callback to read image files from the VFS.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user