Jump to content
  • Advertisement
Sign in to follow this  
andrew111

Shadow map bias method mentioned in graphics gems 3

This topic is 3153 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 came across a method for calculating a shadow map bias, mentioned in the Graphics Gems 3 book on page 341. It says:
Quote:
If the depth map cell only encounters one surface, then the depth map value is set to the same value as if there were no surfaces in that cell
Quote:
If there is more than one surface that hits the depth map cell, then the depth map cell value is assigned to be an average between the first two visible surfaces with respect to the light source;
What I don't understand is how you could possibly know how many surfaces there are, since with shadow mapping you are usually just storing the closest surface depth to the light. Does anyone know a way of finding the number of surfaces the light is hitting on a depth map cell? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Depth peeling could be applied during the shadow map rendering in exactly the same way as one would in the color buffer for order-independent transparency. Not sure if that's what they're doing, but notice that the need is only for the average of the first two surfaces, not the average of all the surfaces.

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!