I was trying to write a grid with animation effect using noise function in the shader, and found out that, if you use LineSegments and ShaderMaterial together, the output is not as expected.
code
The sample code is supposed to draw a square, but it actually draws (at least) 2 extra lines. I assume it switchs to gl.LINE_LOOP under the hood while LineSegments should use gl.LINES. When I changed the material to LineBasicMaterial, everything works fine.
Is it a bug or intended?