- Home /
Multiple materials, same texture - performance?
I have an environment build entirely using just 1 texture and 1 material. Now I would like to highlight some objects using a different shader (i need to pass the same texture atlas to it).
My question is, is it cheaper to pass the same texture (the GPU will figure out that it already has it in the memory), or is it cheaper to create a custom texture just for this single object?
Thanks in advance :)
John
Answer by Itaros · Nov 07, 2014 at 06:42 PM
Meshes having different materials are non-batchable resulting in increase of draw calls. Everything else is neglectable.
This doesn't answer my question, as I need to use different materials. The question is which method is faster (new texture (small), or same texture (big, but already on GPU?) )? Or did you incorporate your answer into "Everything else is neglectable." and I really shouldn't care?
@Jasior0000: Exactly, it doesn't matter. Especially in relation to speed. The only thing that might be influenced is the memory consumption (which isn't related to performance at all).
Without knowing the exact resolution of your individual textures and how they would be packed into an atlas you can't tell which one would requires less memory.
All right, I guess that answers my question :) Thank you guys!
Your answer
Follow this Question
Related Questions
Is it bad to have this many materials? 2 Answers
texture/material optimization 1 Answer
Do materials with same texture yet different shaders share the texture? 1 Answer
Setting Material Textures at runtime for the rest of the game 0 Answers
One material for many objects with different textures 2 Answers