Sign in to follow this  
remijuh

Facetted shadow mapping question

Recommended Posts

remijuh    100
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
maxest    623
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

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