Jump to content
  • Advertisement
Sign in to follow this  
Sambori

Stencil Shadow Problem

This topic is 3274 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!