Advertisement Jump to content
Sign in to follow this  
robydx

trapezoidal shadow mapping

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

I describe what I've done: I calculate the 8 corner of view frustum (from value they are all right). I create the matrix that I call lightProj: this matrix is the product between a view matrix created from lightposition to 0,0,0 and a projection matrix (fov 90°). I've transformed this 8 point for lightProj, now I should have points from -1 to 1 when they are inside light view frustum. From this point's I've calculated the 4 trapezoidal point. Then from this I've calculated NT matrix (this one seems to be right because the 4 trapezoidal points became a -1 1 square when I transform for NT). At last I use to render the scene lightProj x NT. In shadowmap now I should see the scene stretch to gave object near the camera more space. Is something wrong in my algorithm or could be a problem of trapezoidal calculation? please help

Share this post


Link to post
Share on other sites
Advertisement
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!