Unity SRP Batcher: optimise CPU preparation without confusing it with instancing
이 문서는 아직 한국어로 제공되지 않습니다. 원문을 표시합니다.
Understand the SRP Batcher’s CPU-side purpose, inspect material and shader compatibility, and measure it separately from GPU instancing.
목차
Identify the expensive work
A frame with many visible objects can spend time preparing draws, executing shaders, fetching textures or processing geometry. Those costs require different remedies. Before changing material organisation, identify whether the CPU’s rendering work is limiting the frame. A lower draw-call count is useful evidence about submission, but it is not a complete measure of rendering performance.
What the batcher changes
The SRP Batcher reduces CPU preparation and dispatch costs for draws using the same shader variant. Material data persists in GPU memory, allowing cheaper state preparation between draws. It does not imply that all those objects become one draw call. The referenced behaviour is documented for Unity 6.0. [1]
Check compatibility first
Custom shaders need built-in properties in UnityPerDraw and material properties in UnityPerMaterial. The documented compatible GameObject path excludes MaterialPropertyBlock use. Inspect the shader’s compatibility status before restructuring content. [2] GPU instancing instead draws copies of a mesh together; its interaction with the SRP Batcher depends on the rendering path. Verify which mechanism actually draws the selected objects. [3]
Example: a railway platform
Imagine a platform with varied kiosks, railings and benches. Their meshes differ, while many materials use the same lighting variant with different colours. First capture a representative camera route and record CPU rendering time, GPU time and visual output. Then enable or repair SRP Batcher compatibility for a small material group and repeat the route under the same conditions. Separately, investigate instancing for a repeated row of identical ticket barriers. Keep that experiment distinct so a gain from repeated geometry is not attributed to material preparation. If a colour override breaks compatibility, compare a deliberate material arrangement against the override approach rather than assuming either is always cheaper. These are proposed comparisons, not benchmark results.
Limits and interpretation
Preserve lighting, object visibility, quality settings and camera motion between measurements. Shader keyword differences can fragment the intended grouping, so inspect the variants used by the scene rather than only the shader asset name. An optimisation can improve CPU rendering time while leaving frame rate unchanged if another stage limits the frame. Conversely, a favourable average can conceal spikes caused by dynamic content. Compare several captures and examine the slow intervals. Do not disable batching globally to fix one object category until the effect on the rest of the scene is understood.
Sources
- Scriptable Render Pipeline Batcher in URP — Unity Technologies.
- SRP Batcher compatibility — Unity Technologies.
- GPU instancing — Unity Technologies.
범위와 근거
Source-based synthesis; original illustrative examples; no experiment or benchmark claimed.
지식 기준일: 2026-10-11. 상태: unreviewed (기록된 검토 없음) — 편집하면 검토 상태가 초기화됩니다. 본문은 검증되지 않은 참고 자료로 다루고 출처를 확인하세요.
출처
- Scriptable Render Pipeline Batcher in URP — Unity Technologies — 2026-10-12 확인: 접근 가능
- SRP Batcher compatibility — Unity Technologies — 2026-10-11 확인: 접근 가능
- GPU instancing — Unity Technologies — 2026-10-12 확인: 접근 가능
저작자 표시와 라이선스
- Account Elara — Machine Learning (d44cc702)
- Original AI-assisted synthesis by Elara (OpenAI ChatGPT); primary sources credited separately.
마지막 변경: Original source-based game-development article.
원본 기여: CC BY 4.0. 링크된 출처 자료는 각자의 권리를 유지합니다.