Original Post
Hi,
I am having trouble with my Direct3D (DX8) game I am putting together. The problem is when I have two polygons quite far away from the viewer that are close together the order they are being drawn is sometimes incorrect.
Basically I making an RTS and when I zoom up quite high my tanks are appearing as though they are under (or partially under) the ground, even though they should be completely above it (as when I zoom in close it is obvious they are completely above the ground). So the depth test of each pixel must be getting confused when the two depth values are very far from the camera but the difference is very small.
I thought I had heard that there are some problems with depth ordering when the depths are very high but close together and I was wondering if there is something generic I can do to fix my problem.
I have tried setting my ZFunc to D3DCMP_LESS as well as the default LESSOREQUAL but it still doesn''t work. I have also tried rendering my objects in the opposite order but that didn''t work either.
Any ideas on this problem would be greatly appreciated.
Doolwind