Version: Unity 6.1 Alpha (6000.1)
Language : English
Make a GameObject compatible with the GPU Resident Drawer in URP
Adjust settings to improve performance in URP

Enable GPU occlusion culling in URP

GPU occlusion culling means Unity uses the GPU instead of the CPU to exclude objects from rendering when they’re occluded behind other objects. Unity uses this information to speed up rendering in scenesA 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
that have a lot of occlusion.

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
    .

How GPU occlusion culling works

Unity generates depth textures from the perspective of camerasA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
and lights in the scene.

The GPU then uses the depth textures from the current frame and the previous frame to cull objects. Unity renders only objects that are unoccluded in either frame. Unity culls the remaining objects, which are occluded in both frames.

Whether GPU occlusion culling speeds up rendering depends on your scene. GPU occlusion culling is most effective in the following setups:

  • Multiple objects 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.
  • The scene has a lot of occlusion, especially if the occluded objects have a high number of vertices.

If occlusion culling doesn’t have a big effect on your scene, rendering time might increase because of the extra work the GPU does to set up GPU occlusion culling.

Enable GPU occlusion culling

  1. Go to Graphics, select the URP tab, then in the Render Graph section make sure Compatibility Mode (Render Graph Disabled) is disabled.
  2. Enable the GPU Resident Drawer.
  3. In the active Universal Renderer, enable GPU Occlusion.

Analyze GPU occlusion culling

You can use the following to analyze GPU occlusion culling:

Additional resources

Make a GameObject compatible with the GPU Resident Drawer in URP
Adjust settings to improve performance in URP