Two textured primitives overlapping

Hello everybody,

I have a 3d map built from a heightmap with a collection of quads that passes through it. With textures added, it gives the impression of water (like in the picture below).

The issue I have is that the points of intersection give this untidy cut like the one in the picture. I’m using OpenGL with C++ (and Win32). What are my best options for solving this?

I can’t be certain, but that may be caused by insufficient depth-buffer resolution. Try increasing the near plane distance when creating the projection matrix.

That was it. I’ve increased it by 0.5 and everything turned out great. Thanks a lot