Search Issue Tracker
Fixed
Fixed in 2021.3.15f1, 2022.2.0b15, 2023.1.0a14
Votes
113
Found in
2021.3.8f1
2022.1.13f1
2022.2.0b4
2023.1.0a6
Issue ID
UUM-3711
Regression
No
Shader variant build preparation does not scale
When building shaders Unity enumerates through all possible shader variants to be able to strip the excess variants using scriptable stripping. With the amount of multi_compile features increasing in the shaders, the full variant space can grow into sizes where the time and memory requirements to process becomes unbearable.
URP is especially hurt by this due to how much it utilizes multi_compile. Take the URP template project and build it. A significant portion of the time goes into preparing 400M variants, after which we only compile the required ones. Now add a few multi_compiles on top of that and the preparation can take hours.
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
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
- Crash on EditorApplication:Internal_CallUpdateFunctions when pushing property block by index to SpriteShapeRenderer
Resolution Note (fix version 2023.1.0a14):
Added a shader keyword pre-filtering system to avoid enumerating through the full variant space. Utilized by URP only for starters.
This makes the build faster again by avoiding processing millions of variants just to be stripped.
Resolution Note (fix version 2022.2.0b15):
Added a shader keyword pre-filtering system to avoid enumerating through the full variant space. Utilized by URP only for starters.
This makes the build faster again by avoiding processing millions of variants just to be stripped.
Resolution Note (fix version 2021.3.15f1):
Added a shader keyword pre-filtering system to avoid enumerating through the full variant space. Utilized by URP only for starters.
This makes the build faster again by avoiding processing millions of variants just to be stripped.