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:
@@ -95,13 +95,14 @@ class OSGSHADOW_EXPORT MinimalShadowMap : public StandardShadowMap
|
||||
osg::Matrix _modellingSpaceToWorld;
|
||||
float _maxFarPlane;
|
||||
float _minLightMargin;
|
||||
ShadowReceivingCoarseBoundAccuracy _shadowReceivingCoarseBoundAccuracy;
|
||||
ShadowReceivingCoarseBoundAccuracy _shadowReceivingCoarseBoundAccuracy;
|
||||
|
||||
struct OSGSHADOW_EXPORT ViewData: public BaseClass::ViewData
|
||||
{
|
||||
osg::Matrix *_modellingSpaceToWorldPtr;
|
||||
float *_maxFarPlanePtr;
|
||||
float *_minLightMarginPtr;
|
||||
int _frameShadowCastingCameraPasses;
|
||||
|
||||
ConvexPolyhedron _sceneReceivingShadowPolytope;
|
||||
std::vector< osg::Vec3d > _sceneReceivingShadowPolytopePoints;
|
||||
|
||||
@@ -65,9 +65,12 @@ class OSGSHADOW_EXPORT ProjectionShadowMap : public MinimalBoundsBaseClass
|
||||
virtual void frameShadowCastingCamera
|
||||
( const osg::Camera* cameraMain, osg::Camera* cameraShadow, int pass = 1 )
|
||||
{
|
||||
// Force dependent name lookup
|
||||
ShadowProjectionAlgorithmClass::operator()
|
||||
( &this->_sceneReceivingShadowPolytope, cameraMain, cameraShadow );
|
||||
if( pass == BaseClass::ViewData::_frameShadowCastingCameraPasses - 1 )
|
||||
{
|
||||
// Force dependent name lookup
|
||||
ShadowProjectionAlgorithmClass::operator()
|
||||
( &this->_sceneReceivingShadowPolytope, cameraMain, cameraShadow );
|
||||
}
|
||||
|
||||
// DebugBoundingBox( computeScenePolytopeBounds(), "ProjectionShadowMap" );
|
||||
BaseClass::ViewData::frameShadowCastingCamera( cameraMain, cameraShadow, pass );
|
||||
|
||||
Reference in New Issue
Block a user