在 URP 中启用 GPU Resident Drawer
URP 中的 BatchRendererGroup API
使游戏对象与 URP 中的 GPU Resident Drawer 兼容
要使游戏对象与 GPU Resident Drawer 兼容,请检查其是否具有以下属性:
- 具备网格渲染器 (Mesh Renderer) 组件。
- 在网格渲染器 (Mesh Renderer) 组件中,光照探针 (Light Probes) 未设置为使用代理体 (Use Proxy Volume)。
- 仅使用静态全局光照,而非实时全局光照。
- 使用支持 DOTS 实例化的着色器。请参阅支持 DOTS 实例以了解更多信息。
- 在一个摄像机完成渲染后和另一个摄像机开始渲染前不移动位置。
- 不使用
MaterialPropertyBlock API。
- 没有使用每个实例回调(例如
OnRenderObject)的脚本。
从 GPU Resident Drawer 中排除游戏对象
要从 GPU Resident Drawer 中排除游戏对象,请将禁止 GPU 驱动渲染 (Disallow GPU Driven Rendering) 组件添加到游戏对象。
- 选择游戏对象。
- 在检视面板 (Inspector) 窗口中,选择添加组件 (Add Component)。
- 选择禁止 GPU 驱动渲染 (Disallow GPU Driven Rendering)。
选择递归应用于子对象 (Apply to Children Recursively) 以排除游戏对象及其子项。
其他资源
在 URP 中启用 GPU Resident Drawer
URP 中的 BatchRendererGroup API