Which is the best way to pass an array to a shader?

Hello,
I have to pass to the vertex shader at least 10 positions resulting from the collisions between every mesh in the scene and the one with this shader.
In your experience which is the best way to do this?


 material.setParam("CollisionPoints", VarType.Vector3Array, new Vector3f[10]);

should work

Afaik you have to specify a maximum number of collision points in glsl since only fixed lenght arrays are allowed. Probably best to do trough some define i guess

“at least 10”. So probably more than 10? Up to the total number of vertexes in the mesh maybe?

Add another vertex buffer to mark the colliding/not-colliding vertexes.