mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 16:49:54 +00:00
Disable shadows properly for water reflection/refraction RTT targets, eliminating remaining OpenGL errors.
This commit is contained in:
parent
1ca7ea23d1
commit
eb44de3e6b
1 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <components/resource/imagemanager.hpp>
|
||||
#include <components/resource/scenemanager.hpp>
|
||||
|
||||
#include <components/sceneutil/shadow.hpp>
|
||||
#include <components/sceneutil/waterutil.hpp>
|
||||
|
||||
#include <components/misc/constants.hpp>
|
||||
|
@ -263,6 +264,8 @@ public:
|
|||
mRefractionDepthTexture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
|
||||
|
||||
attach(osg::Camera::DEPTH_BUFFER, mRefractionDepthTexture);
|
||||
|
||||
SceneUtil::ShadowManager::disableShadowsForStateSet(getOrCreateStateSet());
|
||||
}
|
||||
|
||||
void setScene(osg::Node* scene)
|
||||
|
@ -341,6 +344,8 @@ public:
|
|||
|
||||
mClipCullNode = new ClipCullNode;
|
||||
addChild(mClipCullNode);
|
||||
|
||||
SceneUtil::ShadowManager::disableShadowsForStateSet(getOrCreateStateSet());
|
||||
}
|
||||
|
||||
void setWaterLevel(float waterLevel)
|
||||
|
|
Loading…
Reference in a new issue