Jump to content
  • Advertisement
Sign in to follow this  
remijuh

Facetted shadow mapping question

This topic is 2673 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 am currently looking into the facetted shadow maps article which can be found in the book Shader X7 by Wolfgang Engel. Unfortunately there seems to be little information on the web regarding this subject. In all, the article is pretty clear. The only thing I cannot wrap my head around is how to calculate F, the facet direction vector. This vector is in the direction of the perspective warp and represents the direction of the line that bisects each facet. Furthermore the vector is perpendicular to the light direction. I guess that each facet can be bisected by a plane. Calculating the cross product between this plane and the light direction gives a vector that fulfills the requirements above. My question is whether anyone has any experience with this kind of shadow mapping and whether my approach is correct. I was also wondering what happens when the light direction is parallel to the forward vector of the camera. In this case the cross product does not exist.

Share this post


Link to post
Share on other sites
Advertisement
I think you overcomplicated the whole thing. The F direction *you* specify. If you pass [0, 1, 0] (this is in screen-space) then the warping will go up along the Y-axis. For example, if you want to have 4 facets, you will probably need vectors: [0, 1, 0], [1, 0, 0], [0, -1, 0] and [-1, 0, 0].

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!