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

## 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 on other sites
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].

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 13
• 9
• 12
• 9
• ### Forum Statistics

• Total Topics
631437
• Total Posts
3000063
×