From c569b8a1f3099d1f266d82951857d807e4844ebf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 7 Oct 2008 15:19:48 +0000 Subject: [PATCH] Restoring Roger's original 2.0 factor as on review the later orthographic projection code doesn't require the position to be far out from the center to simulate an infinite light. --- src/osgShadow/ShadowTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgShadow/ShadowTexture.cpp b/src/osgShadow/ShadowTexture.cpp index 366c4f6ea..ea3a932d5 100644 --- a/src/osgShadow/ShadowTexture.cpp +++ b/src/osgShadow/ShadowTexture.cpp @@ -207,7 +207,7 @@ void ShadowTexture::cull(osgUtil::CullVisitor& cv) lightDir.normalize(); // set the position far away along the light direction - osg::Vec3 position = bb.center() + lightDir * bb.radius() * 10.0; + osg::Vec3 position = bb.center() + lightDir * bb.radius() * 2.0; float centerDistance = (position-bb.center()).length();