Jump to content
  • Advertisement
Sign in to follow this  
Dynx

Z-fail stencil shadow volume artifact [Solved]

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

Hello everyone, I've been implementing z-fail stencil shadow volume past couple days, I think I do have a pretty good understanding of it now, though there is one artifact left that I couldn't quite figure out why it occurs. Screenshot The problem is that I can see the front caps of the shadow volume through shadow receivers and I'm not sure if it is an expected case with z-fail or if an implementation issue. If its not expected I can share my implementation to get your comments on it. When drawing the cap, both front and back tests should fail as the pixels are behind the receiver, leading to a +1 - 1 stencil value so I can't quite grab why it draws it anyway. What do you think? [Edited by - Dynx on January 18, 2009 6:34:09 PM]

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the great response,

I think it is also related to why the shadow is also cast on the back faces of a shadow receiver. Again if this is expected what is the rationale behind it?

Screenshot!

Share this post


Link to post
Share on other sites
It was related to using all triangles for the shadow volume instead of only using the ones that contribute to the silhouette. I couldn't quite figure out why it happens maybe someone else could shed some light on it but since it looks like I'm alone in this thread...

Posted the source on my website if anyone cares to check it out.

[Edited by - Dynx on January 18, 2009 6:33:55 PM]

Share this post


Link to post
Share on other sites
Are you creating a shadow-specific mesh? I recommend you to look at the "ShadowVolume Sample" article on the Microsoft DirectX SDK Help. It explains the general procedure to build a shadow-specific mesh.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!