Search Issue Tracker
Fixed
Fixed in 2021.3.16f1, 2022.2.2f1, 2023.1.0a22
Votes
21
Found in
2021.3.12f1
2022.1.21f1
2022.2.0b12
2023.1.0a13
Issue ID
UUM-17405
Regression
Yes
Shader compilation time is higher in 2021.3 than in 2020.3
Reproduction steps:
1. Open the “ShaderCompilation” project
2. Make sure “Library/ShaderCache” is deleted
3. Open the “Addressables Groups” window
4. Select “Build > Clear Build Cache > All”
5. Select “Build > New Build > Default Build Script”
6. Observe the build duration in the Console
Expected result: the duration is not higher than in 2020.3, e.g. 15 minutes or less
Actual result: the duration is higher than in 2020.3, e.g. 28 minutes or more
Reproduced in: 2021.1.0a10, 2021.3.12f1, 2022.1.21f1, 2022.2.0b12, 2023.1.0a13
Not reproduced in: 2020.3.41f1, 2021.1.0a9, 2023.1.0a14, 2023.1.0a16
Reproduced using: macOS Monterey 12.0.1 (2.4 GHz 8-Core Intel Core i9, 32 GB 2667 MHz DDR4)
Note: if the Console doesn’t log the duration, use the “dur” value of “Building Default Build Script“ in “Library/com.unity.addressables/AddressablesBuildTEP.json”
-
tom_opuscope
Jan 24, 2023 13:43
issue is still here for me.
-
CosmicStud
Dec 13, 2022 22:44
For me on 2022.2.0f1, shader compilation time went from 30 minutes to damn near 4 hours. I tried reinstalling project editor multiple times, refreshing cache, same settings across both. Same result, majority of time, it freezes and causes the Mac too restart without finishing the build.
The most time comes from Beautify shaders since there are so many, nonetheless for me 2022.2.0f1 is unusable.
-
QuaternionInterpolation
Nov 15, 2022 09:42
I'd also love to see this issue resolved.
I'm currently facing almost 20 hours of build time while waiting for the build system to resolve something like 800M shader variants.
This is a huge blocker and currently unable to generate QA builds until this is fixed.
Really appreciate you guys prioritizing this issue if possible.Thanks!
-
ImpossibleRobert
Nov 11, 2022 19:31
This my single most important issue currently, it's a complete blocker for me to upgrade from 2021.1 and has me locked into an ancient version
-
Cloudwalker_
Oct 30, 2022 20:18
eta?
-
IncrediblyWalrus
Oct 26, 2022 13:13
This is so important to be looked into. Hopefully it's soon.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2023.1.0a22):
The reason for the increased shader compilation times, in this case, was due to an increase in array sizes for Additional Light Shadow in URP Shaders. That change has now been reverted. Additionally, we remove any shader parameters for Additional Light Shadows if the feature is disabled in the URP Asset.
To further improve compilation times we have also added Shader Prefiltering, which helps with stripping out unused shader variants early in the shader processing stage.
Resolution Note (fix version 2022.2.2f1):
The reason for the increased shader compilation times, in this case, was due to an increase in array sizes for Additional Light Shadow in URP Shaders. That change has now been reverted. Additionally, we remove any shader parameters for Additional Light Shadows if the feature is disabled in the URP Asset.
To further improve compilation times we have also added Shader Prefiltering, which helps with stripping out unused shader variants early in the shader processing stage.
Fixed in 2022.2.2f1
Resolution Note (fix version 2021.3.16f1):
The reason for the increased shader compilation times, in this case, was due to an increase in array sizes for Additional Light Shadow in URP Shaders. That change has now been reverted. Additionally, we remove any shader parameters for Additional Light Shadows if the feature is disabled in the URP Asset.
To further improve compilation times we have also added Shader Prefiltering, which helps with stripping out unused shader variants early in the shader processing stage.