As I start to get some deeper(or at least a little bit better) understanding on how camera transformations works, I am curious about one thing: How much matrices should I use ?
I mean, until now I have been working with simple 2d ortho projection and I was using world positions (not in range -1.0 to 1.0 ) so I just created a matrix at the start of the program and that was it but when I wanted to get more to 3D(to get same effect of not using NDC) I noticed (in tutorials) that they use a lot of matrices(for example : they create matrix for every object ingame for translation and then send it to the GPU). This confuses me because I thought that I will use only 3 matrices (for every transform step). Can you explain me how is this done in professional games? Do I need to load new model matrix for every object(send it to vertex) ? Or change the whole MVP matrix in shader with every object being rendered? Is it still sufficient? Thanks
Edit About efficiency : Is it efficient to change the shader variable that often ? I mean, I want use my batch system from my old code and it looks like this now:
1. Bind texture + VAO
2. Render object.1+object.n via glDrawArrays/Elements/Instanced
But what about now it would be :
1. Bind texture + VAO
2. Load model matrix of object.1(via glUniformMat4fv) and render it, then load another model matrix for object2 and same for every object in batch
Isn´t it inefficient to change shader variable that much ?