Hi,
I'm trying to understand how to save draw calls effectively with tk2d while using a perspective camera, however I'm running into some unexpected behavior.
Here's what I tried:
- I set up a simple scene with 5 objects with 5 separate sprite collections
- The camera is a regular Unity camera and is set to perspective mode
- When the scene starts I get 5 draw calls (which is expected)
- When I duplicate some of the objects they sometimes get batched, sometimes they don't. Usually, they don't. Batching seems to happen at complete random locations in the scene. It looks as though the closer the objects to the camera's center the more they get batched. The farther they are the less. This is regardless to any overlapping (I'm making sure nothing overlaps while testing this).
- When I switch to orthographic camera batching works as expected (I get 5 draw calls constantly).
This is with Unity 4.1.5f and tk2d 2.0. All sprites are animated using tk2dSpriteAnimator
Can anyone please help to explain what practices I should use to effectively batch my objects in a perspective camera? I'm a bit confused here and not sure where to start.
Thank you!
Yaniv