Hello everyone! What I’m trying to do is render multiple dashed disconnected lines from a dataset. The dataset its basically a list of line objects that have different number of x,y,z points, different width and different dashSize and gapSize. To handle different width on the lines I followed the change that was suggested here How to change line width in Shader, to modify the shader and create a buffer attribute that will have the width value. For the dashSize and gapSize i was thinking of doing something similar, but before that i cant figure out how to make the dashing pattern from one segment of a line to not influence the other segment.
I created this sandbox as an example Dash pattern
As we can see, the end of the first segment continues as the start of the first segment, making the dashing pattern different between those lines.
What i want to achieve is, giving similar points, and same dash size, the dash pattern should look the same between these lines.
I also need a draw a big number of lines, so I want to avoid having to create a geometry and a material for each line, to reduce the number of draw calls.