From d82c85913a402d402367b616b941084c17b380f5 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 24 Jan 2019 23:07:38 +0000 Subject: [PATCH] Don't bother multiplying a matrix by its inverse and applying that to the light direction. Hopefully this will improve numerical stability and reduce shadow flicker a little. --- components/sceneutil/mwshadowtechnique.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sceneutil/mwshadowtechnique.cpp b/components/sceneutil/mwshadowtechnique.cpp index 6f3d34cb1a..08117b4f95 100644 --- a/components/sceneutil/mwshadowtechnique.cpp +++ b/components/sceneutil/mwshadowtechnique.cpp @@ -474,7 +474,7 @@ void MWShadowTechnique::LightData::setLightData(osg::RefMatrix* lm, const osg::L lightDir.set(-lightPos.x(), -lightPos.y(), -lightPos.z()); lightDir.normalize(); OSG_INFO<<" Directional light, lightPos="<