Added ShadowSettings::s/getMaximumShadowMapDistance(double) property, usage of these property in ViewDependentShadowMap,
and setting of it with --max-shadow-distance <double> in the osgshadow example.
This commit is contained in:
@@ -799,9 +799,12 @@ void ViewDependentShadowMap::cull(osgUtil::CullVisitor& cv)
|
||||
cv.computeNearPlane();
|
||||
}
|
||||
|
||||
//minZNear = osg::maximum(10.0,minZNear);
|
||||
//maxZFar = osg::minimum(60.0,maxZFar);
|
||||
// clamp the minZNear and maxZFar to those provided by ShadowSettings
|
||||
maxZFar = osg::minimum(settings->getMaximumShadowMapDistance(),maxZFar);
|
||||
if (minZNear>maxZFar) minZNear = maxZFar*settings->getMinimumShadowMapNearFarRatio();
|
||||
|
||||
//OSG_NOTICE<<"maxZFar "<<maxZFar<<std::endl;
|
||||
|
||||
Frustum frustum(&cv, minZNear, maxZFar);
|
||||
|
||||
// return compute near far mode back to it's original settings
|
||||
|
||||
Reference in New Issue
Block a user