Example code of my blog post about rendering 2D lines in WebGL shaders with as little cpu involvement as possible.