Vertex shaders artifacts appearing as camera angle changes

I made a vertex shader that deforms a plane with different color on each face.
The issue depending on the camera angle, artifacts appear and behave like a mask.
Do you have any suggestions for resolution?

Thanks for your time :pray:.


Fragment shader ain’t got no power to deform anything. Could you share:

  1. How to you create the plane?
  2. Related vertex and fragment shader code.

Yes of course ! it’s debugging fatigue :smiling_face_with_tear:

I made a scene for you : Three.js base - JSFiddle - Code Playground

We got this glitch only when I put a circle mask for the alpha channel on my fragment shader.

float mask = 1. - step(.5,distance(vUv, vec2(.5)));

gl_FragColor = vec4(color, mask);

// No glitch here
//gl_FragColor = vec4(color, 1.0);