Version: Unity 7.0 Alpha (7000.0)
Language : English
Scriptable Render Pipeline Batcher in URP
Enable the SRP Batcher in URP

Check whether a GameObject is compatible with the SRP Batcher in URP

GameObject compatibility

In any given scene, some GameObjects are compatible with the SRP Batcher, and some aren’t. Compatible GameObjects use the SRP Batcher code path, and non-compatible GameObjects use the standard SRP code path. For more information, see How the SRP Batcher works.

A GameObject must meet the following requirements to be compatible with the SRP Batcher code path:

  • The GameObject must contain either a mesh or a skinned mesh. It can’t be a particle.
  • The GameObject mustn’t use MaterialPropertyBlocks.
  • The shader that the GameObject uses must be compatible with the SRP Batcher. For more information, see Shader compatibility.

Shader compatibility

All lit and unlit shaders in the the Universal Render Pipeline (URP) and the High Definition Render Pipeline (HDRP) fit this requirement (except for the particle versions of these shaders).

For a custom shader to be compatible with the SRP Batcher it must meet the following requirements:

  • The shader must declare all built-in engine properties in a single constant buffer named UnityPerDraw. For example, unity_ObjectToWorld, or unity_SHAr.
  • The shader must declare all material properties in a single constant buffer named UnityPerMaterial.

You can check the compatibility status of a shader in the Inspector panel.

You can check the compatibility of your shaders in the Inspector panel for the specific shader.
You can check the compatibility of your shaders in the Inspector panel for the specific shader.
Scriptable Render Pipeline Batcher in URP
Enable the SRP Batcher in URP
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961