Search Issue Tracker
By Design
Votes
0
Found in [Package]
Issue ID
1382258
Regression
Yes
[URP] Player build time regression caused by huge increase in shader variants before stripping
Steps:
1. Create a new URP Template project
If there are RendererData errors, on ProjectView > select Settings folder > right click and Reimport it
2. Import the attached ShaderVariantTool, put the tool in an Editor folder
3. BuildSettings > click Build
4. After build finished, find the generated CSV in project root folder
5. Open the CSV and observe "Variant Count before Stripping" and "Stripping+Compilation Time" for Universal Render Pipeline/Lit
Reproducible:
2022.1.0a16 (86a669)
Shader Variant Count before Stripping: 2359928
Shader Stripping+Compilation Time: 5m 8.0s
2021.2.0b14 (d7e84b)
Shader Variant Count before Stripping: 2359928
Shader Stripping+Compilation Time: 8m 24.4s
2021.2.0b1 (1e2674)
Shader Variant Count before Stripping: 2359952
Shader Stripping+Compilation Time: 8m 5.5s
Not-reproducible:
2021.2.0a20 (bd21e)
Shader Variant Count before Stripping: 37520
Shader Stripping+Compilation Time: 3m 7.7s
2021.2.0a19 (f81c6a)
Shader Variant Count before Stripping: 37520
Shader Stripping+Compilation Time: 3m 6.4s
2021.2.0a18 (281d88)
Shader Variant Count before Stripping: 37520
Shader Stripping+Compilation Time: 3m 5.0s
Tested on Win DX11.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Build and Run button greyed out for locally invalid architecture, despite remote build is specified
- Graphics Settings: “Use Defaults” checkboxes misaligned in Tier Settings section
- VFX Graph particles are not culled when using URP and Frustum Culling is enabled on VFX Mesh Output
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
Resolution Note:
Resolved as by design. The increase in pre-build shader variants is expected.