I wanted to make a test to see how accurate the Z-buffer is in practice. It can be calculated in theory based on the near plane, far plane, and floating point accuracy, but somehow that didn't seem right in practical terms.
So I made a test. Two triangles are positioned at xyz = 0,0,0 and then the second triangle is moved back by a small amount. I then move the camera back until the triangle behind starts z-fighting with the triangle in front, and note down the distance at which it happened and the z-difference between triangles. If the z-buffer was "perfect" this would never occur.
Here are my results (click for big):

There are 4 series based on values for the camera near and far planes. For example, the 4th series has the near plane set at 5, and the far plane at 80000. You can see that for example, if the distance between two polygons is 3 tv units and the camera is at above 8000 units there will be z-fighting, and bellow, there won't. I guess that's pretty clear.
These values were obtained by comparing two triangles triangles which had their XY size at 1000x300 , so this is more realistic since there will usually be an angle at which you see geometry, so in fact the distances to some pixels were greater and if calculated strictly by the z-buffer accuracy formula, they would be lower, but for practical purposes this seemed better for me. I'm sure nobody needs this, but I just thought I'd post it anyway.
