Jump to content
  • Advertisement
Sign in to follow this  
Hermes

Shadow volume tutorial

This topic is 5037 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 i was just wondering ,when casting the shadow and disabling writing into depth buffer( glDepthMask(GL_FALSE)),how is the shadow clipped against the room ?[looksaround] Thanks for your support!

Share this post


Link to post
Share on other sites
Advertisement
The shadow-volume does not automaticaly get clipped against other geometry. It will continue right on to the clipping plane of your viewing matrix (and you do not need the depth buffer to clip against that).

The depth buffer contains information on how close the currently closest object is. So that when you render a new object you can determine whether it goes in front or behind the objects already on the screen.
Since the shadow volume itself should not be visible you do not want it to update the depth information. Otherwise you would get funny results, like objects hidden behind the (otherwise invisible) shadow-volume.

Maybe read some tutorials here on gamedev, like 'the theory of stencil shadow volumes'. Or try googling.

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.

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!