Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Here is the artifact:

Artifact

Here is some clarifying information:

  1. This appears only at 480 units from the origin, and seems to get worse (to a point) as I move away.
  2. All water should have sand rendered behind it, but the sand should be occluded (since I will eventually be rendering the water semi-transparently).

Here is my guess:

This looks like z-fighting, but my issue with this hypothesis is that none of these polygons are co-planar.

share|improve this question
1  
Probably just need to change the near plane, the far plane should be fine. –  Byte56 Jan 4 '12 at 6:05
    
You'll find that this also varies from graphics card to graphics card too. I never have issues like that on my PC, but my laptop regularly has them. –  Byte56 Jan 4 '12 at 16:17

2 Answers 2

What are your far and near clipping planes set to? Try adjusting them to be closer together and see if that solves the issue. I think it's z-fighting as well, and it could crop up even if the polygons aren't on the same plane, depending on the precision of the depth buffer, the closeness of the clipping planes, etc.

share|improve this answer
    
Well, My near plane is set to 0.01, and my far plane is set to about 300 units. I find it funny that this is only happening when I move away from the origin. –  John Gietzen Jan 4 '12 at 6:15
4  
The way projection works, the closer near plane is to zero, the worse the z-buffer precision will be. Push the near plane as far as possible (like 1.0 or something). The far plane doesn't matter. –  Jari Komppa Jan 4 '12 at 6:51
2  
@JohnGietzen - There is a nice write-up on the z buffer that taught me quite a bit - it's for OpenGL (but the z buffer works the same for OpenGL and XNA). He even wrote a calculator. –  Jonathan Dickinson Jan 4 '12 at 8:26

As D C said, this is probably z-fighting, caused by insufficient depth buffer resolution, caused by a too-near near plane.

You might be interested in the answers to this question of mine, How do I methodically choose the near clip plane distance for a perspective projection?, which describe several different approaches to choosing the near clipping plane.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.