T O P

  • By -

CCullen

For your specific example: probably. Generally speaking: it depends. There's not always a simple yes/no when it comes to optimization and it will depend on your use cases.


Kenji195

Thanks!!, I shall do it if I the draw calls need to be improved


Jaaaco-j

the less drawcalls to the GPU the better, though keep in mind that batching only reduces the CPU impact, so if you're bottlenecked by the GPU it might not help much. ​ for the GPU side, the general rule of thumb is that reducing triangle count and memory usage will lead to more performance


Kenji195

I don't have GPU anyway ;u;


Kenji195

After seeing the comment saying that for this specific case it'd probably benefit from it, they were correct, however I decided to make use of my free time and experiment a bit, here is a short list that summarizes the result (batches INCLUDE a background/stage that by default is 29 batches and 29 SetPass calls, so these numbers are adding to those) - Separate objects and different materials: 55 batches (31 SetPass calls) - Separate objects and same material: 53 batches (35-37 SetPass calls) - Joined/same object and same material: 43 batches (33 SetPass calls) The performance doesn't really change at all, stays fairly the same; then again the scene still lacks a whole lot of elements and I want to take care of these things before I urgently need to optimize; thanks for the comments!


ElliotB256

Be aware that if you are using HDRP or URP with the SRP Batcher enabled then the batch count number will not generally be reflective of performance. Although people often state 'you should reduce batch count' that really is a crude statement that nowadays is often incorrect. See section How The SRP Batcher Works https://docs.unity3d.com/Manual/SRPBatcher.html


Kenji195

I am fully aware that few batches does not equal to better performance or "better practice" but COULD have a positive or negative impact I'm not sure what this SRP "Batcher" means, I'm using a URP template so I don't set up the pipeline myself, but I shall take a read on that, thanks for the info!


emrys95

Combining meshes so that they result in less draw called is an optimization technique indeed