Hi, I already know I should be able to solve my problem easily with a geometry shader. But that is not in my possession, and probably will not for a while.
During rendering I am sending lines to the GPU in that line order. I want to color all the lines(that do have the same length) in the same way.
for example: the first vertex of the line should be yellow, the last (for example vertex 100 of the line, if the line length is 100) should be red.
I was wondering if I could use the vertex shader in any way to color them correctly.
At the moment it is working if I use an extra color array of the same size as all the vertices I need. But since I use 16k vertices over 5400 time steps, the color array will be as big, and that is not preferable.
I am using this to draw these lines(path lines, curves)
glMultiDrawArraysEXT(GL_LINE_STRIP, indices[t], count[length], particles);
I think this is not easily solved, maybe impossible…