I’m struggling to understand what’s happening.
I have a gameobject that is set to mobile diffuse shader, no shadows and it’s doing 2 draw calls and 1 if i remove the only directional light which is set with a culling mask that doens’t include the object layer.
No layer in the mask = no extra draw call. Any layer = 1 more draw call.
And of course it’s happening to all my gameobjects.
1 draw call for the object, and one for the light to affect said object.
If your objects are not moving, mark them as static and try using mobile unlit and bake a lightmap.
this is simply one of unity 5’s many bugs , culling masks dont work in unity 5 at all well with lights atleast , try for yourselves add a directional light to the scene and set its mask to nothing and watch as every object has illumination strange really how they missed this bug but yeah , just submit a bug report to them with the project so they can get the problem resolved. hope this answers your question, unfortunately theres not much we can do to avoid the issue.
If your object’s appearance is affected by lighting, Unity must do another round of calculations for each object that is affected by the light. 1 object * 3 lights = 3 draw calls. 40 objects * 40 lights = you just crashed your mobile device.
Let me get it straight because it seems many people don’t understand my problem.
I combined all my static gameobjects and baked the lightmap, so far so good. I have only one directional light that is set to baked only.
I want the option to have some real time shadows if the device can support it so i add another light set to realtime with a culling mask to only affect the gameobject i need to have real time shadows.
And here comes the trouble: All my gameobjects have an extra draw call reported in the stats, even if they are supposed to be unaffected by the real time light.
I know my english is quite bad but i thought i made it clear enough.