Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Thomas Obermaier

[Planar Shadows] Avoiding Z-Buffer Fights

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

Hi there! I''m currently using planar shadows in my application (fits the requirements perfectly). Everything is nice, as long the shadows are black. But when there is transparency, my system fails (of course). I have some Z-Fights (due to overdraw in my projection) One solution is using the stencil buffer, but i think it should be also possible with some depth testing tricks. Can anyone tell me how to do that. All my tests failed up to now. What do you think is faster? Stenciling, or (if it is possible) depth testing tricks? best regards, thomas

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Not quite sure what you''re aiming at, but have you considered polygon-offset?

Share this post


Link to post
Share on other sites
Ok

I render my planar projection shadows with glBlendFunc(GL_DST_COLOR, GL_ZERO); to achieve some nice colors. The problem: if one face is covering another face after the projection, i have darker regions in my shadow. the easiest solution will be using the stencil buffer to avoid that. But why using stencil tests, when it could be solved by some depth test functions... but i dunno whats the best way to set all those states...

maybe someone has an idea?

TIA

Thomas

Share this post


Link to post
Share on other sites

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