Annoying Nvidia/ATI DepthBuffer differences

Started by
2 comments, last by mind in a box 12 years, 9 months ago
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:
6u9c6myy.jpg

But he has to go down to 5 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?
Advertisement
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?
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.
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.

This topic is closed to new replies.

Advertisement