From 47fff7f99837f020fbe8f12bfeb7ef81b1fe279b Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 19 May 2025 15:06:19 +0100 Subject: [PATCH] Disable shadows even harder On GPUs that can detect when all fragments in an execution group take the same branch, this might run faster. Even if it doesn't, it might suppress any weirdness coming from sampling the dummy shadow maps. --- components/sceneutil/shadow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/sceneutil/shadow.cpp b/components/sceneutil/shadow.cpp index 1d5e5d6209..a03700578d 100644 --- a/components/sceneutil/shadow.cpp +++ b/components/sceneutil/shadow.cpp @@ -104,6 +104,8 @@ namespace SceneUtil ("shadowTexture" + std::to_string(i - mShadowSettings->getBaseShadowTextureUnit())).c_str(), static_cast(i))); } + stateset.addUniform(new osg::Uniform("maximumShadowMapDistance", 0.00001f)); + stateset.addUniform(new osg::Uniform("shadowFadeStart", 0.0f)); } ShadowManager::ShadowManager(osg::ref_ptr sceneRoot, osg::ref_ptr rootNode,