Weird artifact at polygon intersections

I have a very rudimentary game, a shooter above simple terrain. To simulate water, I am drawing a translucent (alpha blended) texture-mapped plane at a given height parallel to the xz-plane.

My terrain is defined as a collection of triangle strips, not sexy, but serviceable. The problem I’m having is that at the intersections, strange triangular effects are occurring; the boundary seems to have a “saw-like” appearance. Rotating the image widens and compresses the length of the “teeth”.

Is there a solution anyone can recommend for this aside from deeper tesselation of the terrain? Would switching to NURBS produce smoother intersections? Any tips anyone has would be greatly appreciated, pointers to code examples even more so =)

  • Steve

are you using enough bits for your depth buffer?

switching to nurbs won’t help you, because when drawing, you have to tesselate your nurbs into triangles and you will have the same problem again.

Wow, that was it exactly. I had the near plane in my gluPerspective call too close to zero. That made all the difference, thanks!

  • Steve