I’d like to write a shader to animate a system of particles. To work, I’d need to pass extra data per vertex. The problem is, the amount of data will change quite a bit depending on the current state of the program. Each vertex will need a set of n 4x4 matricies and a set of n floats to weight the matricies. The shader will then computer a weighted sum for each vertex to determine it’s final position.
Unfortuantley, I have no idea how to pass this information, as I wil not know in advance what n is. (Inface, n will likely change over the course of hte program). As far as I can tell, OpenGL SL will only accept fixed length information. I suppose I could try to cram everything into a texture and access it through a sampler, but this will be resolution and tricky to code.
Is there any way I can pass arbitrary data to a shader?