The shadersA program that runs on the GPU. More info
See in Glossary in 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) use shader keywords to support many different features, which might mean Unity compiles a lot of shader variantsA verion of a shader program that Unity generates according to a specific combination of shader keywords and their status. A Shader object can contain multiple shader variants. More info
See in Glossary.
The following resources are about speeding up builds by reducing the number of shader variants URP compiles.
For more information, refer to Reduce shader variants, which applies to all render pipelines.
| Page | Description |
|---|---|
| Check how many shader variants your build has | Log how many shader variants Unity compiles and strips. |
| Strip feature shader variants | To remove shader variants for features you don’t use, enable Strip Unused Variants in URP Graphics settings. |
| Enable dynamic branching in shaders | Make Unity use dynamic branching in prebuilt or custom shaders, instead of keywords and shader variants. |