Sign in to follow this  

zFail capping for stenciled shadow volumes

Recommended Posts

Hi! I create Shadow Volumes by extending the occluder with quads between the triangles. Then I extrude them in the vertex shader, if the vertex´ normal isn`t facing the light. For shadow detection I use zFail and everything works fine! But then I tried to calculate the shadow volume on the cpu. Therefore I calculated the silhouette and extrude it. For capping I tried out 3 versions: 1) Use frontfaces as front cap and extruded backfaces as backcap. 2) Use frontfaces as front cap and extruded and reversed frontfaces as backcap. 3) use backfaces as frontcap and extruded backfaces as backcap. ...but I always get the same error. Next to the correct shadow, there is another view-dependant wrong shadow. What is this? And how do I get rid of it? Thank you for reading!

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