Original Post
Hi I'm just now implementing the PSSM demo tutorial found here: http://hax.fi/asko/PSSM.html in my scene. I was wondering if you guys notice that the last shadow map split jitters when you rotate your camera? Its not always the last shadow map, sometimes the 2nd/3rd to the last gets affected as well. It probably happens in the CalculateLightForFrustum() function, perhaps when the zooming is applied to the projection matrix: Has anyone applied a fix to this? It has an adverse side effect to the whole scene. Advance thanks.
// Next we build a special matrix for cropping the lights view
// to only contain points of the current frustum split
//
float fScaleX=2.0f/(fMaxX-fMinX);
float fScaleY=2.0f/(fMaxY-fMinY);
float fOffsetX=-0.5f*(fMaxX+fMinX)*fScaleX;
float fOffsetY=-0.5f*(fMaxY+fMinY)*fScaleY;
D3DXMATRIX mCropView( fScaleX, 0.0f, 0.0f, 0.0f,
0.0f, fScaleY, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
fOffsetX, fOffsetY, 0.0f, 1.0f );
// multiply the projection matrix with it
_mLightProj*=mCropView;
// finally modify projection matrix for linearized depth
_mLightProj._33/=_fLightFar;
_mLightProj._43/=_fLightFar;