mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-24 13:43:43 +00:00
Disable shadows properly for water reflection/refraction RTT targets, eliminating remaining OpenGL errors.
This commit is contained in:
parent
1ca7ea23d1
commit
eb44de3e6b
@ -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…
x
Reference in New Issue
Block a user