Search Issue Tracker

Fixed in Unity 2019.3

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

LW RP

-

-

Priority: 7Not yet prioritized for a release

-

Severity: 1Crash, freeze, data loss, work stops

How to reproduce:
1. Open attached Unity project "gunspinningvr"
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.

Response avatar

Resolution Note:

"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 (10)

  1. 9f85fb6e14e7a0b811d4f5887a06c854?d=mm

    indieDoroid

    Jun 08, 2019 00:42

    As mentioned above.

    "Disabling "Optimize Mesh Data" in player settings speeds things up a little bit."

    That was my issue. Thanks man, forgot I set that on.

  2. A06a1eac36fe80f522cd6f6693c396af?d=mm

    unityuserunity85496

    Jun 04, 2019 22:07

    not fixed in 2019.3.0a2 compiling some 15,000 variants for a very small project for oculus go

  3. 54b00e8b3fb9e130c4a819b674b1207f?d=mm

    Gooren

    May 28, 2019 19:19

    Unity 2018.4.1f1 that came out today does not mention this issue in release notes. Is the fix for this going to be merged into 2018.4 LTS?

  4. 17e15d0a78fd293c6bad5b9a2af8e9c6?d=mm

    unidag

    May 06, 2019 19:55

    What "future release" is this fixed in?

  5. 414086b1616c99b6102d3501ab2b8e67?d=mm

    unity_Asb-cOwaP2koxA

    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.

  6. E53f5f84b17df4fa85a156d58abc5c15?d=mm

    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.

  7. 7ad5047ca16b3a8e2e04b7ae6de25b4c?d=mm

    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

  8. Ec14bd79deccd47f855e7cb1aee2d432?d=mm

    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.

  9. 495e55a1ab7af58b9c2dbec7b81135f1?d=mm

    Peter77

    Feb 19, 2019 18:26

  10. B70be5d23c0a4255ee079feb1a433c9e?d=mm

    13Flo

    Dec 03, 2018 06:46

    Reproduced on 2018.3.0b12

All about bugs

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