Search Issue Tracker

Fixed in 2019.3.X

Fixed in 2018.4.X, 2019.1.X, 2019.2.X

Votes

44

Found in

2018.3.0b5

Issue ID

1090892

Regression

No

Building project gets stuck on "Compiling shader variants" dialog when Lightweight Render Pipeline/Lit shader is compiling

--

-

How to reproduce:
1. Open attached Unity project
2. Build project

Expected result: Project is built successfully on the selected platform.
Actual result: Building project gets stuck on "Compiling shader variants" dialog when Lightweight Render Pipeline/Lit shader is compiling. Once it is finished, compiling starts over again.

Reproduced with: 2018.3.0b1, 2018.3.0b10.

Devices under test:
Reproduced on:
VLNQA00150, Samsung Galaxy S9 (SM-G960U), Android 8.0.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00153, Google Pixel XL (Pixel XL), Android 9, CPU: Snapdragon 821 MSM8996 Pro, GPU: Adreno (TM) 530
Windows Standalone
iOS

Note: Can't build on 2017.4, 2018.2, 2019.1, 2018.3.0a because of errors.

Fixed in: 2019.2.0b7, 2019.3.0a6.

  1. Resolution Note (fix version 2019.3):

    "Optimize Mesh Data" in Player Settings causes build process to resolve unused vertex channels by checking all used shader variants. This used to happen in a very inefficient way, fetching the same shaders over and over again. The issue is fixed by implementing better shader data caching during the build process.

Comments (17)

  1. unidag

    May 06, 2019 19:55

    What "future release" is this fixed in?

  2. mkroll

    Apr 02, 2019 09:53

    2018.3.11f1 even without LW/HD-RP, builds take sometimes over one hour...
    Disabling "Optimize Mesh Data" in player settings speeds things up a little bit.

  3. b4th

    Mar 27, 2019 16:42

    Unity appears to be compiling every single shader variant for every material. So if two materials reference the same shader, Unity attempts to compile all variants of that shader twice. Reducing the number of materials and shader references in each scene seems to speed up the compile process slightly (compiling a shader seems to take longer the first time around, and speeds up on subsequent passes), but if a shader has 10,000 variants, like the Standard shader, it still seems an unnecessary amount of processing.

  4. TheNenet

    Mar 08, 2019 14:06

    On Android :
    Works fine on 2018.2.2
    Takes forever and crashes on 2018.3.6 and 2018.3.7

  5. SuperSonic68

    Feb 22, 2019 15:39

    Working on a Mobile VR experience is a nightmare using any Unity build later than 2017.4. I don't know what changed between 2017 and 2018+. I suspect it's got something to do with the new Stripping scriptable shader variants features, but I'm quite unfamiliar with the whole thing. All I know is 2017 Android builds go a heck of a lot faster than 2018 Android builds and "Compiling Shader Variants" is the culprit.

  6. Peter77

    Feb 19, 2019 18:26

  7. FlorianBernard

    Dec 03, 2018 06:46

    Reproduced on 2018.3.0b12

Add comment

Log in to post comment