Setting Custom Max Primitives on GLSL Advanced deletes all primitive and vertex attributes. Not sure if that’s necessary, but feels weird.
Hello @josefpelz
Internally, when the number of vertices and primitives is determined by the input, we can simply reference the input vertex or primitive attributes if they don’t need to be modified.
However, if the number of vertices and primitives is changed by setting Custom Max Primitives, we must allocate memory to copy the attributes from the input. In this case, we allow the user to select which attributes should be retained, minimizing memory consumption.
Does it make sense?
Makes perfect sense, thanks!
Good question, and I’ll add what Guillaume mentioned to the wiki page.
The expectation is that if you change the number of points or primitives you’re responsible for updating all the attributes values on the output.
If for some reason you’re fine having a mismatch between the lenght of an attribute buffer and the number of elements you can use an Attribute Combine POP to add the attributes back (with a parameter to specify what happens outside of the range, hold, repeat…)