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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Resolution Note:
Resolved as by design. The increase in pre-build shader variants is expected.