• Advertisement
Sign in to follow this  

Almost have "fail-pass" shadow volume working perfectly

This topic is 2980 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement