- Home /
Which is more efficient?
I was wondering, which idea is more efficient?
Each mesh has its own material but the texture size is quite small
Every mesh shares one material but the texture size is large and holds all the textures for every object
Also, if a mesh uses only a portion of a texture, does the whole texture get rendered or is it only part of the texture that the object uses? Thanks guys
Answer by Regalith · Jun 27, 2014 at 12:03 AM
Sharing textures is more efficient, since the more materials you have, the more draw calls during runtime. Texture Atlas's help minimize draw calls by combining textures into one giant texture.
So if about 200 objects use a material that is 2048 X 2048, it will be better than if they had their own materials? Is it rendering the full 2048 texture or only part of it?
The texture gets loaded and cached into memory, so its only one look up for all 200 objects so its more efficient. Since memory is so cheap now, its not a issue if a whole 2048 texture gets loaded
If you're building for mobile platforms, be aware that some have a $$anonymous$$ax texture size limit (think iOS might be 1024x1024). But otherwise this is definitely the better approach.