• Advertisement
Sign in to follow this  

Stencil Shadow Problem

This topic is 3187 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 have a basic stencil shadows working for a relatively complex model; however, when I look at the model from a point closer to the light source, from above, then I see another copy of the shadow (actually the occluder) casted as a shadow. What's this visual artifact called? What causes it? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
What stencil shadowing method do you use (depth-pass or depth-fail)?
It seems that you use the depth-pass method and you do have a problem with near plane clipping.
I'd suggest using the depth-fail approach to shadow volumes.
And I'd highly recommend reading this article: The Theory of Stencil Shadow Volumes

Share this post


Link to post
Share on other sites
Actually I'm using depth-fail method. I dont have the back(dark) caps set as I have the shadow volume planes extended to very far away using a large value. I set the far clipping plane of the view frustum to a very large number as well so that it does not clip the extended shadow volume planes. I have the light caps set properly however.
I don't setup perspective matrix neither the w to handle infinite shadow volumes cause I'm not sure how :)


Share this post


Link to post
Share on other sites
Not enough info?

I tried to use infinity shadow volume using an infinite projection matrix. That solved the problem but another problem arises which is depth/z buffer fighting.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement