• Advertisement
Sign in to follow this  

stencil shadows problem

This topic is 4903 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'm using stencil buffer as it's discribed at DX SDK. when camera in scene is OUTSIDE of shadowvolume, all is ok. but when i move it INTO shadow volume problem appears: shadows invert. all shadowed pixels become bright and vice versa. how can i solve this problem?

Share this post


Link to post
Share on other sites
Advertisement
You are using z-pass technique, wich doesn't require a closed shadow volume but if viewport is inside the volume or it intersects the near plane you will have problems.

There is another technique called z-fail, that always work even if viewport is inside of it. To let it work, your shadow volume must be capped (closed in the both sides).

Read this article http://www.gamedev.net/reference/articles/article1873.asp and after google for some examples and another topics about z-fail at GDN.

Share this post


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

  • Advertisement