Depthbuffer issue

I’ve run across a visual anomaly related to the depth buffer settings. Perhaps someone can shed light on the issue - and perhaps it is an artifact of my own video card - ATIMobility Radeon X1400, with 256 MB ram. The attached patch renders a jpg 3 times via a transform with 3 TranslateX slices. If the camera is maneuvered to an angle similar to that of the screen capture in the zip file (depthbufferprob.jpg), there are frequent angles that have the “striping” problem or similar pixel distortions. I am using the DrawFixed Ex9.Effects node, but have seen similar problem with the Mask node. The three image copies are essentially on the same plane. and if I move their TranslateX value until none are overlapping, the problem goes away. I’ve seen this or other problems using any of the windowed Depthbuffer formats. Any ideas?

backbuffimgtest.zip (76.0 kB)

hi
in cases like this just turn the depth buffer off
and your quads will be rendered in the order you spreaded them
this is not a bug, its how renderers work
if you still need the depth buffer for other things then spread the z axis too or size the quads so they dont overlap and use transforms on texcoords

the only problem i see is that all the quads were in the same coordinates ,cheers

backbuffimgtest.rar (32.7 kB)

This is a known and fundamental problem with depthbuffers, as they have only a finite resolution in z. Its called z-fighting.

You might notice that the problem gets less visible when switching to a higher resolution backbuffer, or when moving the Nearplane and Farplane closer together.
To solve it, connect a ZWriteEnable node and set the CompareFunction back to LessEqual which is the default mode when no ZWriteEnable node is connected.

Then set the DepthBias pin for each of the objects to some different values.

The Depth Bias will modify the z-value which gets written to the z-Buffer without actually moving the object in z. So you can define a fixed order for your objects even if they have the same z value.