Version: Unity 6 (6000.0)
Language : English
Reducing rendering work on the CPU in URP
Make a GameObject compatible with the GPU Resident Drawer in URP

Enable the GPU Resident Drawer in URP

The GPU Resident Drawer automatically uses the BatchRendererGroup API to draw GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
with GPU instancing, which reduces the number of draw calls and frees CPU processing time. For more information, refer to How BatchRendererGroup works.

The GPU Resident Drawer works only with the following:

  • The Forward+ rendering pathThe technique that a render pipeline uses to render graphics. Choosing a different rendering path affects how lighting and shading are calculated. Some rendering paths are more suited to different platforms and hardware than others. More info
    See in Glossary
    .
  • Graphics APIs and platforms that support compute shadersA program that runs on the GPU. More info
    See in Glossary
    , except OpenGL ES.
  • GameObjects that have a Mesh Renderer component.

Otherwise, Unity falls back to drawing the GameObject without GPU instancing.

If you enable the GPU Resident Drawer, the following applies:

  • Build times are longer because Unity compiles all the BatchRendererGroup shader variants into your build.

Enable the GPU Resident Drawer

Follow these steps:

  1. Go to Project Settings > Graphics, then in the Shader Stripping section set BatchRendererGroup Variants to Keep All.
  2. Go to the active URP Asset and enable SRP Batcher.
  3. Double-click the renderer in the Renderer List to open the Universal Renderer, then set Rendering Path to Forward+.
  4. Set GPU Resident Drawer to Instanced Drawing.

If you change or create GameObjects each frame, the GPU Resident Drawer updates with the changes.

To include or exclude GameObjects from the GPU Resident Drawer, refer to Make a GameObject compatible with the GPU Resident Drawer.

Analyze the GPU Resident Drawer

To analyze the results of the GPU Resident Drawer, you can use the following:

Optimize the GPU Resident Drawer

How much the GPU Resident Drawer speeds up rendering depends on your sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. The GPU Resident Drawer is most effective in the following setups:

  • The scene is large.
  • Multiple GameObjects use the same meshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
    See in Glossary
    , so Unity can group them into a single draw call.

Rendering usually speeds up less in the Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
See in Glossary
and the Game view, compared to Play mode or your final built project.

The following might speed up the GPU Resident Drawer:

  • Go to Project Settings > Player, then in the Other Settings section disable Static Batching.
  • Go to Window > Panels > Lighting, then in the Lightmapping Settings section enable Fixed Lightmap Size and disable Use Mipmap Limits.

Additional resources

Reducing rendering work on the CPU in URP
Make a GameObject compatible with the GPU Resident Drawer in URP