Deferred Rendering Shadow Map Artifacts

Started by
1 comment, last by mauro78 11 years, 11 months ago
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?
-----Quat
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.

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

This topic is closed to new replies.

Advertisement