Several materials or one material with texture atlas

Hi, I’m not English, so sorry if I made some mistakes :(.

What is the most optimized between several materials or one material with texture atlas where we set an offset value ?
For exemple, if I have a model of carpet used once in red, then once in blue, once in green etc… is it better to make one material, duplicate it, change his offset for each variations, or assign the offset value using the code when the game is running with only one material ?
Maybe the result is the same if the code instantiates the material ?

You should always use Atlas when you can…

Thank you for your answer.

I think you mean by that, that we must avoid duplicating, but in both cases from my example, I use an atlas. It is rather with regard to the parameters of the material ( here, the texture offset. It could have been with the smoothness parameter or another parameter or even several at the same time. It’s just that the question arises more often for me with an atlas offset).
The advantage of duplicating the material to change a parameter is that we always have a preview of the final result. While in the case of changing the parameter with code only applies when the game is running but it is maybe more optimized.

1 Like