GPU instancing is a draw call optimization method that uses a single draw call to render multiple 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 that 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 and material. This speeds up rendering when you draw things that appear multiple times in a 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, for example, trees or bushes.
GPU instancing is a built-in functionality of GPUs. Each copy of the mesh is called an instance. Each instance can have different properties, such as color or scale.
The performance benefits of GPU instancing depend on the platform and the GPU. For each draw call, Unity has to collect, combine, and upload properties from various memory locations, so the performance overhead might outweigh the benefits. The performance benefits are better on mobile platforms than on desktop platforms.
GPU instancing is compatible with all Unity render pipelines. If you use the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary (URP) or High Definition Render Pipeline (HDRP), GPU instancing works with custom shadersA program that runs on the GPU. More info
See in Glossary only if you disable the Scriptable Render Pipeline (SRP) Batcher or make a shader incompatible with the SRP Batcher.
For information on draw call optimization methods you can use instead of GPU instancing, refer to Choose a method for optimizing draw calls.
GPU instancing supports the following types of GameObject:
The following meshes are compatible if you use prebuilt materials:
The following shaders support GPU instancing:
To create a custom shader that supports GPU instancing, refer to the following: