Unwanted "Seams" between voxels on a procedural mesh

Hello,

I’m working on a minecraft like game.

I generate a procedural terrain with voxels, everything works well, but i don’t know why the mesh has “lines” between voxels :

The texture does not contain any lines…

I managed to reduce the effect by rescaling the faces on the UV map :

But that’s not a really elegant method, and the seams only disapear on close-to-camera terrain !

Why sould I do ?

This is caused by mipmapping and not having wide enough padding between UV islands with a atlas texture.

The fix is to:
A) Disable mip maps on the texture, which will result in heavily aliasing in the texture, and possibly performance degradation. It’ll also possibly still break if you enable MSAA.
B) Increase the padding between UV islands, but you’ll still get lines once the mip level drops low enough. So you’d need to limit the mip level either on the texture itself, which requires creating the texture asset in c# as they didn’t choose to expose the option to the texture importer, or the shader.
C) Lots of complicated shader still like doing all mip mapping and bilinear filtering in the shader.

D) or the real solution… use texture arrays.