Shadow volume tutorial
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!
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.
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.
How do I set my laser printer on stun?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement