Sign in to follow this  
Quat

Deferred Rendering Shadow Map Artifacts

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
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
[quote name='Quat' timestamp='1335572719' post='4935501']
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?
[/quote]

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

Regards

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