GPU instancing vs combining meshes for performance?

I have a relatively low poly procedurally generated scene in which I reuse a bunch of the same objects (walls, floors, etc). I’ve been writing some code to combine a room’s floor tiles into one mesh, its wall tiles into another mesh, etc. However I came across this tutorial (Dynamic Mesh Combining in Unity with C# | Habrador) in which the author says that GPU instancing is essentially the same as mesh combining, but in fewer lines of code. Is this accurate? I tried GPU instancing and got a massive reduction on the GPU, but the CPU still spends a lot of time drawing. Will mesh combining provide more balanced performance for the CPU? I haven’t finished my implementation yet and don’t want to bother if it’s effectively the same.

Thanks for the help!

1 Like

A rudimentary understanding of how graphics are drawn in Unity will tell you that it depends on the mesh and the situation. Any answers you get will unfortunately contain a large amount of guesswork.

My guess is that single meshes will provide higher performance in a non dynamic context, while dynamic is going to be faster if it comes down to shader performance and culling is good while the single mesh is high poly.

Guessing intensifies depending on overdraw, transparency, culling performance and more.

Generally though if one follows good working practise this works well: combine the heck out of everything, and leave instancing for dynamic stuff. Both are needed.

3 Likes