How can I get it to send 4 floats as 1 vec4, when my data are apart? They are structured such that there are an array of 4 of structName, if you get what I mean. Setting the stride by 8 or 32 doesn’t seem to work… I already have them buffered to the GPU with rows of 4 structName.
This is simply not possible. Either restructure your client data to a SOA (struct-of-array) layout or have 8 separate attributes in your shader (weight0, index0, weight1, index1, …).
Thanks, I will try to have rows of weight[4] and index[4] then, as per your former suggestion. If that case, just to confirm with the following code, I should have a vec4 weight and vec4 index instead of a float weight[4] and int index[4] right?