mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-15 12:56:36 +00:00
Merge branch 'no_water_blend' into 'master'
Fix disappearing normals with refraction disabled (#8490) Closes #8490 See merge request OpenMW/openmw!4746
This commit is contained in:
commit
a109052296
2 changed files with 6 additions and 0 deletions
|
@ -565,6 +565,8 @@ namespace MWRender
|
|||
else
|
||||
createSimpleWaterStateSet(mWaterGeom, Fallback::Map::getFloat("Water_World_Alpha"));
|
||||
|
||||
mResourceSystem->getSceneManager()->setUpNormalsRTForStateSet(mWaterGeom->getOrCreateStateSet(), true);
|
||||
|
||||
updateVisible();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <filesystem>
|
||||
|
||||
#include <osg/AlphaFunc>
|
||||
#include <osg/Capability>
|
||||
#include <osg/ColorMaski>
|
||||
#include <osg/Group>
|
||||
#include <osg/Node>
|
||||
|
@ -607,6 +608,9 @@ namespace Resource
|
|||
if (!getSupportsNormalsRT())
|
||||
return;
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue