So with the idea that I want to load in an object with morph targets and for simplicity sake I know it will have between 1-8 position morph targets. Ultimately I want to do
renderedPrimitive.POSITION = primitive.POSITION +
weights * primitive.targets.POSITION +
weights[N] * primitive.targets[N].POSITION;
But being open to load in any model how do you go about knowing the number of vertex input attributes to allocate. Getting the CPU side dynamically is not an issue, but am I wrong that the ONLY way around this is building your shader with some
#define and compiling during runtime?