@gkjohnson
The loader is great job!
And yeah, I had the same thought about to move “discarding” to vertex shader.
So, here is two slightly different options with this approach:
-
Uses an attribute with exact point that the last point of a line moves to:
https://codepen.io/prisoner849/pen/BajOVgw -
Coordinates of the last point of a line compute in vertex shader, based on direction and distance (another attribute):
https://codepen.io/prisoner849/pen/oNbPMzL