I’m a little confused when it comes to draw calls as they pertain to meshes and textures. From what I understand, each texture is a draw call and each mesh is a call. For instance, if I have a character made from 6 different meshes, this would be six draw calls. Is this correct? If I had a character made of 1 mesh but used multiple texture maps, would that mesh then have multiple draw calls?
Also, I know I need to minimize the amount of calls in my scene. Does this work per frame?
Can someone please explain how draw calls are calculated?
Actually, draw calls are per-material. A material is a shader + a texture (or textures). So for instance, a material could be a lightmapping material which uses a color map (normal texture) and a lightmap texture. This will be one draw call if used. Back in the day, if you had two different meshes which used this same material, you’d get two draw calls because you were rendering two separate meshes. But now with batching, if two or more meshes share the same material, they’ll get “batched” (combined) together into a single draw call.
So really all you need to know now is that you want to reuse the same material(s) as much as possible to reduce draw calls. If, hypothetically, you were able to get it so that every single object in your scene drew from the same material (meaning they’d all have to share the same texture, or textures in the case of a lightmapped shader), you would have only 1 draw call.
Yes, that does make sense. Thanks for the help! Is batching supported on the iPhone Basic?
Just to make sure that I am understanding correctly, if I have a character made from several meshes but each mesh is using the same material, that would be one draw call for the character. Is that correct?