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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user