Jump to content
  • Advertisement
Sign in to follow this  

parallel split shadow map demo jitters

This topic is 3659 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

  // finally modify projection matrix for linearized depth

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!