Sign in to follow this  

parallel split shadow map demo jitters

This topic is 3302 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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:
  // 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;

Has anyone applied a fix to this? It has an adverse side effect to the whole scene. Advance thanks.

Share this post


Link to post
Share on other sites

This topic is 3302 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this