Hi! I am trying to figure out and benefit from instancing in order to batch my draw calls and gain performance. I have a scene with 100 torsos and 100 legs. All torsos sharing one material and all legs sharing another, both with GPU instancing enabled. If I render just 100 torsos, they all group in 1 draw call. Same for the legs. But when rendering both for some unknown-to-me reason, it divides the batching in: - some bodies - some legs - some more bodies - some more legs Making 4 draw calls instead of 1. I think is due to the cameras position and the depth passes. Because when I do it with the camera form the top, it batches them fine (like 100 bodies, 100 legs). What is the reason for this, and how can I fix it to group them all independently of the cameras position? Thank you.
https://docs.unity3d.com/ScriptReference/Camera-opaqueSortMode.html set that to NoDistanceSort alternatively, give your materials different render queues
Thank you! Changing the render queues of the material worked having now all RenderForward grouped (4 calls). Nevertheless, the DepthPassJobs are still the same. Are those unavoidable? (in the picture below I have also helmets and head objects, thus 4 calls and not 2)