Difference between dynamic batching and gpu instancing?


I asked myself where’s the difference between dynamic batching of objects with same mesh and material and gpu instancing, as dynamic batching and using single material already decreases drawcalls and batches.


Well, if it’s the same mesh that you’re drawing lots of times I would expect GPU instancing to be more performant, because you’re doing away with the need to manually combine the meshes each frame before sending to the GPU - you just send the mesh once together with the array of per-instance data (which can just be the world matrix) for each instance.

Dynamic batching is more flexible, since you can combine different meshes into a single batch (subject to conditions - e.g. max vertex count).