I have a question about Caching material or not?
From what I see the only have to pass parameters to a shader is through the Material class. So caching material does not work, if some of those parameters needs to be unique to the model the material is assigned to, even though the shader, textures and 99% of all other parameters are the same, but I need to add a couple of unique parameters that relate to a specific Quad.
Only way I can see doing this is not caching the material and for each Quad you their own material class or clone the main one and then I can assign unique parameters to the material so they get to the shader.
If there is another way, please let me know? Does it hurt to have up 64x64x4 different materials so I can pass those couple of unique parameters that apply to that quad only.
Also, what is the best way during update to update all those materials? so they render correctly.
Right now, I have a material manager that is an AppState that loops through the materials to update them.
In my own engine, the Geometry, had a function called before rendering so you can update parameters for geometry so the shader gets the correct value.