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.
This commit is contained in:
Robert Osfield
2008-10-07 15:19:48 +00:00
parent ad72dc66ce
commit c569b8a1f3

View File

@@ -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();