Another interesting test :
I have 2 x 2 overlapping sprites on a given place. If I put sprite1A and sprite 1B on the same Z, but sprite2A and sprite2B on another different same Z (0.1 instead of 0), it displays an overall 10 drawcalls.
Now from that situation, if I put sprite2A (or 2B) on the exact same Z than sprite1A (or 1B), and leave the other one on a 0.1 Z, it gives 11 drawcalls.
wtf ? There's clearly an internal problem on Unity's part here, isn't it ?
(reminder : all 4 sprites are belonging to the same atlas)
edit : made another very simple to repro case :
1) create 4 tk2dSprites, and 2 textMeshes
2) put 2 sprites (overlapping themselves) on the left of the screen, 2 on the right
3) put spriteLeft1 on Z = 0, spriteLeft2 on Z = -0.1. Same for spriteRight1 & 2
4) now put one textMesh on the left sprite pack, at Z = -0.1, same for the right
- it displays 2 drawcalls, as expected.
5) then put the left testMesh at Z = 0 (same Z as the underneath spriteLeft1, in fact).
- it displays 4 drawcalls.
edit 2 : I tried to reproduce the same scenario with FBX imported textured quads (same shader). Exact same scenario, exact same Z position tests, except here it's 2 different FBX with 2 different atlases (to emulate the tk2d sprite + textMesh different atlas).
Guess what ? I have the same drawcall rising in the exact same conditions. As long as I separate each sprite from a different Z pos, it batches correctly. But as soon as I put a sprite on the same Z level as another, drawcalls rise up.