Sign in to follow this  
howie_007

Almost have "fail-pass" shadow volume working perfectly

Recommended Posts

It all seems to be working perfectly except for one minor issue Looks like it's working fine here... looks good here But if you view it this way, you see part of the shadow cap from the other shadow through this object. looks good here I've tried numerous test to try to figure out the problem. Could this just be a side effect to the "fail_pass" method?

Share this post


Link to post
Share on other sites
Do you draw all objects first, then draw all shadows?
Do you disable depth writes correctly when drawing shadows?
It's not a side-effect, and should definitely work correctly. Is it the same scene as in the first picture, viewed from another angle, or have the objects moved so they are intersecting?

Share this post


Link to post
Share on other sites
I got lucky and figured out the problem.

After much examination, I noticed I couldn't see one of the objects through the cube like the second screen shot. So the question was, why not this one?

The solution: The last render pass of your objects that are casting a shadow, need to be sorted in z order. closest to the farthest. This anomaly is removed by the z-buffer.

Finally, we have "fail-pass" shadows working. I've lost a bunch of hair over these shadows. Now if you could do this without rendering the shadow objects twice.

Share this post


Link to post
Share on other sites
Quote:
Original post by Erik Rufelt
Do you draw all objects first, then draw all shadows?
Do you disable depth writes correctly when drawing shadows?
It's not a side-effect, and should definitely work correctly. Is it the same scene as in the first picture, viewed from another angle, or have the objects moved so they are intersecting?


I saw your post right after the above post. Thanks for your help!

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