06-20-2017, 08:19 PM
Hm, this is strange.
You said that the only change in the scene is that you change the camera, but if you look the second two image (2A and 2B) you will see that the camera is exactly the same (Heading, Attitude and Distance are the same to the 10th decimal).
Also, if you would add the same scene objects to the same position again, you would have z-fighting, but because the materials of both objects that "fight" would be the same, you would not see any problem with the rendered image - green fighting green is still green.
But on your images it is clearly seen that some red objects is drawn over the gray road edges.
It looks like you have added another copy of the objects to the same position but the second copy have different materials.
The distribution of z values in the depth buffer is determined with the projection matrix - in case of perspective camera, the distribution is logarithmic, in case of orthographic camera the distribution is linear.
But if you have objects at the same position and with different material then there is no way to prevent z-fighting regardless of the projection.
You said that the only change in the scene is that you change the camera, but if you look the second two image (2A and 2B) you will see that the camera is exactly the same (Heading, Attitude and Distance are the same to the 10th decimal).
Also, if you would add the same scene objects to the same position again, you would have z-fighting, but because the materials of both objects that "fight" would be the same, you would not see any problem with the rendered image - green fighting green is still green.
But on your images it is clearly seen that some red objects is drawn over the gray road edges.
It looks like you have added another copy of the objects to the same position but the second copy have different materials.
The distribution of z values in the depth buffer is determined with the projection matrix - in case of perspective camera, the distribution is logarithmic, in case of orthographic camera the distribution is linear.
But if you have objects at the same position and with different material then there is no way to prevent z-fighting regardless of the projection.
Andrej Benedik

