Sign in to follow this  
mind in a box

Annoying Nvidia/ATI DepthBuffer differences

Recommended Posts

Hi there,

I was implementing some DepthOfField-Effect in the last days. When it started to look good and I thought I was finished with it I sent it over to my teammate.

The image he got out looked different from my result, in fact, there were no blur at all!
I have set my FocusRange-Property to 500, which looks like this:
[URL=http://www.directupload.net][IMG]http://s1.directupload.net/images/110709/6u9c6myy.jpg[/IMG][/URL]

But he has to go down to [b]5[/b] to get the full scene blured! And when he sets the parameter to 8 he reported that he doesn't see any blur at all again.
We had problems with different depth buffer values of Nvidia and ATI cards before (I've got a Nvidia GeForce GTX570, he has an ATI Radeon HD 4890). The biasing of the shadowmapping we're doing was too big or too small on either of the cards.
I solved the that problem by rendering the backfaces of the geometry when rendering the shadowmap.
Well, for DOF we can't do such a trick I guess :)

The depth I use for the DOF was grabbed from the hardware-depthbuffer, though, I linearized it.

Any Ideas?

Share this post


Link to post
Share on other sites
As a guess, I'd go with something being wrong with the way you turn a depth sample back into a linear z value...
Which API are you using? What's the format of the depth buffer? How do you sample it in the shader? How do you linearize the sample?

Share this post


Link to post
Share on other sites
Assuming we're talking about D3D10/D3D11 here, there should not be any difference in the depth value stored in the depth buffer or when you retrieve it. It's well-defined by the spec, so you should get the same values from both IHV's as well as the REF device. I have definitely run into shader bugs before (particularly on Nvidia hardware), which can be tricky to pin down. Either way you can determine if there are any driver bugs by comparing the results each step of the way to the result from the REF device. PIX makes this pretty easy with the "switch to REF" option.

Share this post


Link to post
Share on other sites
We got it.

This issue wasn't because of the hardware, but because of us humans are stupid sometimes. :)
He disabled SSAO, I had it enabled. And that modified the depth value I stored in the alpha-channel of the rendertarget-texture.

Still, there seem to be differences when it comes to shadowmapping (This is why I thought it would be the case this time as well).
I'll dig deeper into this like you said, MJP.

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