- Edited
I am currently struggling to correctly encode a PackedByteArray() for this buffer:
#define MAX_POINTS 9
struct Arc {
vec3 points[MAX_POINTS];
};
layout(set = 0, binding = 5, std430) writeonly buffer Arcs {
Arc data[];
} arcs;
I know it's complex to use structs as data in buffers. I am making it even more complex by also having an array in the struct but I felt like this may be a better workaround than providing a multi-dimensional array.
Is it possible to decode an array of structs that also contain an array?
Or better yet is it possible to setup a RDUniform so that I can write to a vec3[][] array? (would be my preferred way)
I found this thread which is very similar in what I want todo except for me I have a struct with an array:
https://godotforums.org/d/33761-compute-shader-buffer-update-confusion