Pure WebGL Dashed Line
问题 I'm trying to create a dashed line using pure webgl. I know there is already a question on this, and maybe I'm dumb, but I cannot figure out how to make it work. I understand the concept, but I do not know how to get the distance along the path in the shader. A previous answer had the following line: varying float LengthSoFar; // <-- passed in from the vertex shader So how would I get LengthSoFar ? How can I calculate it in the vertex shader? Am I totally missing something? Can someone give