Mapping n-dimensional data arrays to vertex attributes


I’m trying to map n-dimensional per-point data to per-vertex data using the MapDataArrayToVertexAttribute function.

In the past, I have succeeded in mapping integers, floats, and vec3/4 using this function and then adding shaders replacements using the respective function (AddShaderReplacement) and retrieving the appropriate data type. However, with n-dimensional arrays, the information that I’m getting in the vertex shader does not match my information in the polydata.

Here is how I get the data array in the vertex shader declaration in case that’s the problem.

in float data[dim];

If that’s the problem, what is the right way to retrieve the per-vertex data?

Thanks in advance.