Cracked terrain mesh

I have a problem related to a terrain material, it displays weird “cracks” at lines where the mesh lines are going. Any ideas why this is happening?

Standard JME terrain grid terrain?

Your own terrain?

Texture atlas?

How long is this piece of string I’m holding? :slight_smile:

Thank You for Your interest… The thing is I’ve fixed the issue. It’s a terrain grid with a height based material with custom fragment shader.
The weird thing is the issue was fixed by changing:

float angleImpact = clamp (deltaAngle / angleRange,0 , 1 );

to:

float angleImpact = clamp (deltaAngle / angleRange,0000001 , 1 );

the shader is code is here:

Also disabling the antialiasing removed this “cracks”, but that was no solution.

I wonder why this is happening as the difference between clamp(val 0, 1) and clamp(val, 0.0000001, 1) is almost none.

If your texture is in an atlas then the coordinates might be bleeding. Or if a regular texture then it isn’t set to repeat. Or…