- Home /
Weird static batching
Hi,
I'm trying to optimize drawcalls for one level and i could not explain behavior of static batching.
For testing I have two types of transparent objects: palms and grass. I've put lot of grass to my scene. Each grass object is just simple mesh with grass texture and transparent shader. I did the same with palms. Palms use some (different) transparent shader too, but with different material and texture.
When i have only grass in scene i have 13 drawcalls, what is quite good. (so it is 1 drawcall for whole grass) When i have only palms, i have 13 drawcalls too. (this is 1 drawcall for palms )
But when i have both of them in scene, drawcalls will go to 42, which means, that i have 1 drawcall for one palm :(
When i share material and texture between palms and grass, everything is good. But i want to use differnt shader for them. Both of grass and palms are static.
Thanks !