PDA

View Full Version : Two textured primitives overlapping



Revanz
04-06-2015, 01:39 PM
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).

tinypic.com/r/2vi2qu1/8 (http://tinypic.com/r/2vi2qu1/8)

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?

GClements
04-06-2015, 01:54 PM
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.

Revanz
04-08-2015, 08:46 AM
That was it. I've increased it by 0.5 and everything turned out great. Thanks a lot