Jump to content
  • Advertisement

Archived

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

Alload

A question about stencil shadow volume

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

In a nVidia''s article about stencil shadow volume I read that Carmack was overcoming the problem of the far clip plane by dynamically moving it according to the point light whose shadow volumes were rendered. I think this means: nFarClipPlane =(approximately) LightInCameraSpace.z + LightRange This sounds good and it is trivial to create a new projection matrix with this new far clip plane. However one problem remains: we have already filled the depth buffer with the closest value at each pixel BUT with the normal projection matrix, thus the depth buffer will not match with the new projection matrix. How can this new problem be resolved? We could fill for each light the depth buffer with the new projection matrix and then draw the shadow volumes, but this would be expensive...

Share this post


Link to post
Share on other sites
Advertisement
I think he probably does the calc once per frame i.e. work out the max z influence of any light for the scene (in camera space) and then push the far plane outside that. You''re right though, if he does it PER light, then you would have to clear the depth buffer (or the affected area) per light.

T

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.

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!