Hi, I’m trying to find out if using material instances and changing parameters is better for performance than changing the material altogether.
I want to switch the material into several different states at runtime. I can do this by using a material instance on a mesh and changing the material instance parameters at runtime. I can also do this by making a handful of different materials in the editor and changing the mesh’s material at runtime.
I’m doing the “changing” in C++ and I’m currently leaning towards “handful of different materials” simply because it prevents the code from having to know how the material is implemented. If one solution is faster than the other, then it’ll be an easy choice to make. By faster I mean, taking less CPU or GPU time… Is there another reason I should look at one solution or the other?