Search Issue Tracker

In Progress

Fix In Review for 2021.3.X, 2022.2.X, 2023.1.X

Unknown (hidden) 2022.1.X

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”

  1. Resolution Note (fix version 2023.1):

    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.

  2. Resolution Note (fix version 2022.2):

    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.

  3. Resolution Note (2022.1.X):

    Canceling 2022.1 port due to product end-of-life.

  4. Resolution Note (fix version 2021.3):

    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.

Comments (4)

  1. 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!

  2. 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

  3. Cloudwalker_

    Oct 30, 2022 20:18

    eta?

  4. IncrediblyWalrus

    Oct 26, 2022 13:13

    This is so important to be looked into. Hopefully it's soon.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.