I have a bunch of meshes in my scene, both animated and static.
Each of them has a simple diffuse shader, however each of them requires 2 draw calls.
Shouldn't they only require 1 draw call? Is there a reason for needing 2?
I have a bunch of meshes in my scene, both animated and static.
Each of them has a simple diffuse shader, however each of them requires 2 draw calls.
Shouldn't they only require 1 draw call? Is there a reason for needing 2?
Draw calls aren't related to materials, but shaders and light sources and other factors (forward rendering vs. diffuse, pixel lighting vs. vertex lighting, etc.). Forward rendering with the default diffuse shader requires a draw call for the object and another one for each pixel light, although it depends on the version of Unity...Unity 3.3 seems to have only one draw call in this case, with an additional call for each pixel light.
It appears as though the number of draw calls is reduced to one if an object's material is removed....I was under the impression that an object with a material (at least, a simple material) only has 1 draw call. Guess I was wrong.
Since materials are what holds the texture and the mesh is, err, well the mesh it will need two draw calls. One for drawing the texture/material and one for the mesh.
Eg. if you make a mesh with a material using the toon shader you'll need three draw calls (if I'm not mistaken?), one for the mesh, one for main texture and one for the ramp that the shader's using for shading.
//btw sry for the grammar, I've caught the flu and the head's spinning.