From Wojciech Lewandowski, "1: fix for a issue with MinimalShadowMap and LightSpacePerspectiveShadowMapVB techniques ignoring minLightMargin parameter.

2: minor tweak for a DebugHUD drawn improperly case when multiple slave views  shared one window. It now uses slave view viewport to correctly position DebugHUD.
3: deactivated ConvexPolyhedron notifications (they were accidentaly activated when you replaced osg::notify calls with OSG_NOTIFY macro). These warnings are useful only for shadow map developer working on shadow volume optimizations. So there is no sense in having them active all the time."
This commit is contained in:
Robert Osfield
2010-11-24 10:09:04 +00:00
parent 0ee0aad0fe
commit e2a315ee49
7 changed files with 42 additions and 8 deletions

View File

@@ -168,7 +168,7 @@ void MinimalShadowMap::ViewData::aimShadowCastingCamera
osg::Matrix mvp = _camera->getViewMatrix() * _camera->getProjectionMatrix();
cutScenePolytope( osg::Matrix::inverse( mvp ), mvp );
MinimalShadowMap::ViewData::frameShadowCastingCamera
frameShadowCastingCamera
( _cv->getRenderStage()->getCamera(), _camera.get(), 0 );
}
@@ -207,7 +207,7 @@ void MinimalShadowMap::ViewData::frameShadowCastingCamera
// space (-1..1), it may get "twisted" by precisely adjusted shadow cam
// projection in second pass.
if ( pass == 0 )
if ( pass == 0 && _frameShadowCastingCameraPasses > 1 )
{ // Make sure extruded polytope does not extend beyond light frustum
osg::Polytope lightFrustum;
lightFrustum.setToUnitFrustum();
@@ -304,6 +304,8 @@ void MinimalShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv )
_modellingSpaceToWorldPtr = &st->_modellingSpaceToWorld;
_minLightMarginPtr = &st->_minLightMargin;
_maxFarPlanePtr = &st->_maxFarPlane;
_frameShadowCastingCameraPasses = 1;
}
void MinimalShadowMap::ViewData::cutScenePolytope