I'm creating a custom polyline shader that needs to be able to display arbitrary segments in different colors.
I'm able to get it working with a single segment, but I'd like to be able to pass an array of vec2's for start/end position and an array of vec4's for colors for each segment.
Here's a working Sandcastle with a single line segment:
If I try to change the uniforms to arrays, I now get an error that the uniform has an invalid type. How do I specify the uniform type correctly for arrays?
We’d be happy to review a pull request if you make this change. I wonder if it would be better to allow a way to letting the user explicitly state the uniform type for these situations as opposed to guessing it.