Jump to content
  • Advertisement
Sign in to follow this  
Mad Alex

OpenGL Need help with stencil shadows [56K beware]

This topic is 3501 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 gamedev.net, this is my first post here, but I don't really want to give a lengthy intruduction and skip ahead to my problem: (z-fail) stencil shadows. For some days I have tried to get them working with limited success. I really don't see what's wrong with it anymore (maybe I should give it some rest and come back to it later, but I'm impatient :)). So, here are some screenshots: Camera behind the light source. Shadow volume and scene, edges in blue. Shadow volume only, edges in blue. Scene with "phantom" shadow and weird edges on the cubes (z-test is on). The scene above with shadow volume / edges. Close-up of edge-problem. Stencil buffer. Please note that I had to photoshop the image to visualize it. The raw image had a value of 1 at most pixels, but some of them where 255 (can this be correct?). Oh: I do cap the front and back sides of the shadow volume, both caps and the rest of the hull facing outside the volume. From what I can tell there are no holes in it. I'm not extruding it to infinity (yet). I use OpenGL if this is important. Please ask if you have any questions. I can provide code, more images, stencil buffer dumps or even a video where I fly around the scene. Thank you for your help!

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!