I'm trying to draw some lines with webgl, but the lines are not consistent width/color. You can see what I mean in the screenshot.
The vertices I'm using:
let vertices = [
0, -1,
0, 1,
-1, 0,
1, 0,
0.02, -1,
0.02, 1,
-0.02, -1,
-0.02, 1,
-1, 0.02,
1, 0.02,
-1, -0.02,
1, -0.02
];
Vertex Shader
attribute vec2 a_position;
void main() {
gl_Position = vec4(a_position, 0, 1);
}
Fragment Shader
void main() {
gl_FragColor = vec4(1, 1, 1, 1);
}
Can someone explain why this is happening and perhaps point me in the right direction for making these lines look the same?
Thanks in advance!