- Home /
Same material, different textures - efficient or not?
I have a character mesh with a few parts (body, head, limbs), each with their own material:
Each skin material is using the same shader but different textures. If I just make one material and assign that to each skin element and then do the actual texture loading (MainTex, BumpTex, etc.) in code, is that better than using multiples, or is it the same amount of overhead?
In other words, if I use just one material, then when I load the textures into the material for Element 0 via code, does it then make that a new material in memory? So am I just as well off using separate materials as using the same one with different textures?
I hope that makes sense.
Here's one of the materials for reference:
Answer by Eric5h5 · Apr 30, 2010 at 03:21 AM
Each material must be unique anyway; it's not possible to have one material that has two different sets of textures. If you try to assign a different texture to a material, then indeed it does make it a new material.
Hmmm... I'm using the Skin shader from the Wiki and it's got four textures in it. One main, one bump, a rim ramp, and a wrap ramp. What do you mean by "only one texture per material"? Am I just reading that wrong?
@Jak, actually that wasn't what I meant to say, sorry. See my edit.