Sign in to follow this  
DizzERR

stencil shadows problem

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
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

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