Jump to content
  • Advertisement
Sign in to follow this  
Quat

Deferred Rendering Shadow Map Artifacts

This topic is 2268 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 am getting a strange rendering error. I have a directional light (from sun) aiming straight down on a flat grid. I am not getting "shadow acne" but rather shadowing artifacts that look more like z-fighting. It seems to render OK, when my camera is close to the geometry.

My current guess is that it has to do with precision issues when I reconstruct the view space position from the depth buffer. I am reconstructing from nonlinear 24-bit depth buffer so that I did not have to output additional depth in my pixel shader to save bandwidth.

Has anyone experienced similar problems?

Share this post


Link to post
Share on other sites
Advertisement
24-bit nonlinear depth should usually be "enough" for most scenes. If you haven't tried already, you can improve the far-away depth precision by increasing your camera near clip distance. Also, have you checked the correctness of your depth reconstruction by rendering something that obviously goes completely wrong if not correct, for example point lights?

However, on older ATI cards, I have seen gross shadow map artifacts, resulting from imprecise depth reconstruction, when I was sampling the hardware depth buffer (both with OpenGL, and the ATI-specific hack texture formats on Direct3D9). It's as if the sampled depth suddenly has a lot less precision than 24 bits. Personally I solved this by explicitly disabling hardware depth sampling on ATI/AMD hardware and instead rendering linear depth to an extra render target. Edited by AgentC

Share this post


Link to post
Share on other sites

I am getting a strange rendering error. I have a directional light (from sun) aiming straight down on a flat grid. I am not getting "shadow acne" but rather shadowing artifacts that look more like z-fighting. It seems to render OK, when my camera is close to the geometry.

My current guess is that it has to do with precision issues when I reconstruct the view space position from the depth buffer. I am reconstructing from nonlinear 24-bit depth buffer so that I did not have to output additional depth in my pixel shader to save bandwidth.

Has anyone experienced similar problems?


Hi are you getting something like this?
http://www.gamedev.net/topic/624471-deferred-shadows-and-precision/

Regards

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!