Jump to content
  • Advertisement
Sign in to follow this  
Knight52

Shadow map bias issue

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

I understand that bias value I'm having is too small to eliminate the black strip and too large it doesn't cover small objects (50x50x50 box). Previously I asked the question about how to remove the black strip and I got the answer to increase bias value. Later I found out that it's too large to cover the box a bit smaller than 50x50x50 pixels. Does this mean model I'm using is too small?

Also, there's another issue with shadow map. I recently implemented Frustrum culling and when the scene does not render any .x model but only terrain which is blocks of primitive squares, entire area is filled with shadow. It seems color value in the map (z*10/w) is 0. I'm using that to avoid the glitch but it also reduces the quality of the shadow.

Anyone can help me on either of them?

Share this post


Link to post
Share on other sites
Advertisement
Hi!


I understand that bias value I'm having is too small to eliminate the black strip and too large it doesn't cover small objects (50x50x50 box). Previously I asked the question about how to remove the black strip and I got the answer to increase bias value. Later I found out that it's too large to cover the box a bit smaller than 50x50x50 pixels. Does this mean model I'm using is too small?


Adding a constant depth bias is just a trick to get around numerical problems. The bigger problem is that in shadow mapping you compare an exact depth value (from the vertex being transformed to light space) to a roughly discretized value (in the shadow map). The “best” bias then depends on the slope under which the light is looking at the surface, since the discretization errors depends on the slope (thus isn’t constant anymore). A while back, I wrote a bit on that. The pictures and the linked slides will for sure help you a little on the way to understand what’s causing the artifacts. Using a slope-scaled depth bias is just one way to tackle this problem, btw.

Best regards!

Share this post


Link to post
Share on other sites
Personally, I prefer to go to VSM instead, which trades the bias issue for the light bleeding issue. But I've found light bleeding to be much easier to work with/around.

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!