Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Creating custom shaders that support GPU instancing in the Built-In Render Pipeline

Resources for writing HLSL shaders or Surface Shaders in the Built-In Render Pipeline that support GPU instancing.
Read time 1 minuteLast updated 19 days ago

Important
The Built-In Render Pipeline is deprecated and will be made obsolete in a future release.
It remains supported, including bug fixes and maintenance, through the full Unity 6.7 LTS lifecycle.
Resources for writing HLSL shaders or Surface Shaders in the Built-In Render Pipeline that support GPU instancing.

Page

Description

GPU instancingLearn about GPU Instancing in the Built-In Render Pipeline.
Add per-instance properties to GPU instancing shadersAdd per-instanced properties such as color to HLSL shaders and Surface Shaders.
Examples of GPU instancing shadersExamples of an HLSL shader and a Surface Shader that support GPU instancing.
Prevent Unity stripping GPU instancing shadersDisable stripping of instanced shaders in the Project Settings window.
GPU instancing shader referenceExplore the built-in defines and macros you can use to support GPU Instancing in custom shaders.

Additional resources