- Home /
Why do even non-overlapping (distant) transparent objects break dynamic batching based on Z-depth?
I don't understand why Unity is designed so that rendering order for transparent objects takes into account Z-depth but doesn't take into account whether the objects at the same Z-distance do in fact overlap with each other or not. Why do objects that aren't even anywhere near to my batched group of objects still prevent them from being dynamically batched? It feels like it's not a necessity just the way Unity was designed but could be fixed if batching had a few more criteria to be checked before it gets deprioritized against Z-depth. The right way to do would be to insert an if statement into the loop that checks if a group can be batched, a statement that would also check if other objects at the same Z-depth would indeed overlap and so breaking batching is indeed justified. I'd save dozens of draw calls if this worked.