Sign in to follow this  
andrew111

Shadow map bias method mentioned in graphics gems 3

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this