Use logging to check how many shaderA program that runs on the GPU. More info
See in Glossary variants Unity compiles 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).
Note: For more methods you can use to check how many shader variants you have, refer to Check how many shader variants you have.
To log how many variants Unity compiles and strips in total in URP, follow these steps:
Unity logs the shader variant information to the following locations:
Editor.log log file. Search for the section that begins with Shader Stripping. For the location of Editor.log, refer to log files.For each shader, Unity uses the format Total=<Number of variants in build>/<Total number of variants>(<Percentage in build>). For example, the following log indicates that Unity kept 8 of the 39 variants of the Lit shader, including 1 of the 6 vertex shader variants of the ForwardLit shader pass:
Universal Render Pipeline/Lit - Total=8/39(20.51%)
- ForwardLit (ScriptableRenderPipeline) (SubShader: 0) (ShaderType: Vertex) - Total=1/6(16.67%) - Time=0.0691ms
...
To export the information in JSON format, follow these steps:
Temp/graphics-settings-stripping.json and Temp/shader-stripping.json files.