Cause and mechanism
SRP Batcher reduces the CPU work of preparing rendering settings. Using multiple Materials alone does not make it incompatible. Check the actual Shader and Renderer, and measure CPU time separately from draw-call count. Vertex animation or Object Space calculations alone do not determine compatibility either.
Check and correct the setup
- Inspect SRP batches, shader variants, and renderers in Frame Debugger. Submeshes normally require separate material/pass draws.
Inspect preparation cost and draw count separately - In handwritten shaders, keep numeric material properties in UnityPerMaterial and built-in per-draw properties in UnityPerDraw. Keep textures and samplers outside constant buffers.
Inspect preparation cost and draw count separately - Renderers using MaterialPropertyBlock are excluded. Compare instancing for many identical meshes and measure CPU rendering time.
Inspect preparation cost and draw count separately
Limits and verification
Different materials can share an SRP batch when they use the same variant. Atlasing is a separate draw-count optimization. Choose vertex coordinate spaces for the effect, rather than changing them to fix batching.
A focused diagnostic setup
Compare a one-material mesh with a two-submesh version using the same shader variant. Draw count and CPU setup cost are separate metrics.
Test in this order
- Count submesh/pass draws and SRP-batch groups.
Inspect preparation cost and draw count separately - Compare value-only material changes with keyword changes.
Inspect preparation cost and draw count separately - Evaluate consolidation/atlasing against visuals, culling and CPU/GPU time.
Change one variable, then remeasure
Interpret the result
Multiple draws inside one SRP batch are expected. Reducing draw count needs appropriate mesh structure or rendering methods. Judge the actual frame rather than batch grouping alone.
Related explanations
- Draw Call
- SRP Batcher (Scriptable Render Pipeline Batcher)
- Shader Graph vertex animation and SRP Batcher