Hello fellow artists and developers, I have a question for anyone who might have more experience than myself.
So, I’ve been reading through optimization guides while scouring the net and I pose this question:
Since my project only makes use of three master materials (Except for special circumstances like landscape, water, etc.) But easily 95% of all materials in my project are instances of the three master materials. I’ve also eliminated the need for the Static mask parameters by creating my own material function. It costs only a few more instructions than the mask parameter, but allows me to change the mask channel without the need to recompile the shader.
The only time an instance needs to recompile is when I need to change the shading model in the material instance. Although, I usually tend to stick with Default Lit, Subsurface, and Cloth shading. I have a translucent master setup, but it’s not yet optimized and therefore haven’t used it in a level until I fix it.
Two of the three master material use around 250 instructions. The third master material is a world aligned material that makes significant use of Luo’s absolutely invaluable World Aligned Texture and Rotation material functions. But it incurs a little less than 290 instructions, if memory serves correctly.
I also do not have any tessellation enabled. I feel like no matter what, the performance impact is too large to justify using it.
Now, I usually have anywhere from 1-6 different materials assigned to meshes when I import them, but said materials are immediately replaced by instances.
However, I don’t know if the performance cost that apparently comes with having more than one material per mesh is neutralized by the efficiency of my materials. Or if I would be better of creating Master materials with multiple material attributes.
Any insight on this would be greatly appreciated!