Beyond Traditional Batching: Mastering Draw Calls in the SRP Batcher
In the modern era of game development—specifically within Unity’s Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP)—the "draw call" has evolved. While traditional optimization focused purely on reducing the number of draw calls through static or dynamic batching, the SRP Batcher takes a more sophisticated approach. Introduced to solve the CPU bottleneck of re-binding render states, the SRP Batcher focuses on reducing the cost of each draw call by making material data persistent on the GPU. In 2026, where scenes are increasingly dense with unique materials, understanding how to keep your objects within an SRP Batch is the difference between a stuttering experience and a fluid 144 FPS.
Table of Content
- Purpose: CPU-Side Render Speed
- The Mechanics: Persistent GPU Buffers
- Step-by-Step: Enabling and Validating SRP Batches
- Use Case: Dense Urban Environments
- Best Results: Compatibility and Shader Design
- FAQ
- Disclaimer
Purpose
The SRP Batcher is designed specifically to address CPU-bound rendering. In complex projects, the CPU often spends more time "talking" to the GPU (setting up shaders and materials) than the GPU spends actually drawing pixels.
- Reduce SetPass Calls: Minimizes the overhead of switching between different materials.
- High Material Variety: Allows hundreds of unique materials to be drawn efficiently, provided they share the same shader.
- Stable Framerates: Lowers the "RenderLoop" time in the Unity Profiler, freeing up CPU cycles for gameplay logic and AI.
The Mechanics: Persistent GPU Buffers
Traditional batching (Static/Dynamic) tries to merge meshes into one big mesh to send a single command. The SRP Batcher does not merge meshes. Instead, it uploads material data into Large GPU Constant Buffers once.
When the CPU needs to draw 50 different objects using 50 different materials (but the same shader), it no longer has to re-upload the entire material state 50 times. It simply tells the GPU: "Use the data already at this memory address." This reduces the "per-object" setup time to almost zero.
Step-by-Step
1. Enable the Batcher in your Pipeline Asset
Locate your URP or HDRP Asset in the Project window. In the Inspector, under the Advanced or Rendering section, toggle the SRP Batcher checkbox to On.
2. Ensure Shader Compatibility
For a shader to work with the SRP Batcher, it must use CBUFFER blocks for material properties.
- UnityPerDraw: For built-in engine properties (position, lightmaps).
- UnityPerMaterial: For your custom variables (color, textures).
Note: Most Shader Graph shaders are compatible by default.
3. Avoid MaterialPropertyBlocks
Using renderer.SetPropertyBlock() instantly breaks SRP Batcher compatibility for that object. If you need per-object variation, use many materials or the newer GPU Resident Drawer (Unity 6+) features instead.
4. Inspect via the Frame Debugger
Open Window > Analysis > Frame Debugger. Look for entries labeled SRP Batch. If you see many small batches, click one to see the "Reason for breaking the batch." Common reasons include "Different Shader Keywords" or "Different Shader."
Use Case
A developer is building a Cyberpunk City with 500 unique neon signs, each with its own color and texture.
- Traditional Problem: 500 materials would cause 500 heavy SetPass calls, tanking the CPU.
- SRP Batcher Solution: Because all signs use the same "Neon_Shader," the SRP Batcher groups all 500 draw calls into a single sequence.
- The Result: The CPU setup time drops from 8ms to 0.5ms, despite the high visual variety.
Best Results
| Technique | When to Use | SRP Batcher Compatibility |
|---|---|---|
| SRP Batching | Many objects, many materials, same shader. | Primary Choice |
| GPU Instancing | Thousands of identical meshes (grass, pebbles). | Incompatible (Use one or the other) |
| Static Batching | Large, non-moving environments. | Compatible (But often redundant) |
| GPU Resident Drawer | Massive scenes in Unity 6+. | Extends SRP Batcher logic |
FAQ
Does the SRP Batcher reduce the number of Draw Calls?
Strictly speaking, no. If you have 100 objects, the Statistics window will still show 100 batches. However, it significantly reduces the work the CPU does for each call, which is why the CPU performance improves.
Why is my shader not compatible?
Check the bottom of the Shader Inspector. It will explicitly state "Compatible: No" and list the missing CBUFFER. Ensure all properties are wrapped in UnityPerMaterial.
Should I use GPU Instancing instead?
Use GPU Instancing if you have many identical objects. Use the SRP Batcher if you have many different objects that share a shader. Generally, for modern URP/HDRP games, keep the SRP Batcher enabled globally.
Disclaimer
The SRP Batcher is a low-level optimization. While it helps with CPU bottlenecks, it will not fix GPU-bound issues like high triangle counts or expensive fragment shaders. Always profile your game using the Unity Profiler to ensure you are actually CPU-bound before spending time on draw call optimization. This tutorial is based on Unity 6 and 2022.3 LTS standards. March 2026.
Tags: UnityOptimization, SRPBatcher, DrawCalls, GamePerformance