Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


static_batching

This is an old revision of the document!


Static Batching

  • See StaticBatchingUtility.Combine to batch meshes at runtime.

Static Batching in Unity creates a Read-Only mesh named “Combined Mesh (root: <root-game-object>)”, with a Submesh for each batched renderer. Unity invokes a separate draw call for each range of indices within the combined mesh buffer.

Note that this means Unity does not actually render the entire batch in a single draw call. As they mention, truly merging all meshes would make culling vastly less effective.

Instead, the performance comes from issuing fewer material / mesh change state operations (in OpenGL at least). In a lot of ways, this ends up being more similar to SRP Dynamic Batching.

static_batching.1613082813.txt.gz · Last modified: 2021/02/11 22:33 by 73.95.178.156