Hello, I have an aplication where I have two different shaders, one for normal ( single ) draw calls and other one for instanced draw calls, the effect of the shader is the same, the different between both is that while in the normal draw shader I stored the model matrix in a mat4 uniform, in the instanced shader I have the model matrix for each instance in a vertex attribute using AttribDivisior.
So now I am considering combine both shaders in only one, in order to achieve it, I plan to declare my model matrix uniform as an array of mat4, the normal draw call would use only the index 0 while the instanced would use one index for each instance.
Then the main difference is that in instaced mode the model matrix would be an unifrom array instead of an attribtute.
I have no idea about if in terms on perfomance this change is noticiable.
So what is your opinion?
PD: In my instanced draw call I have arround 250 instanced primitives.