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.
-
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
-
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?
-
unidag
May 06, 2019 19:55
What "future release" is this fixed in?
-
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. -
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.
-
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 -
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.
-
Peter77
Feb 19, 2019 18:26
Related forum thread:
https://forum.unity.com/threads/compiling-shader-variants-taking-ages.527724 -
FlorianBernard
Dec 03, 2018 06:46
Reproduced on 2018.3.0b12
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
- Animation Clip with Legacy enabled does not play when Time.timeScale is set to 0 despite Update mode set to "Unscaled time"
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
- SamplerState Property Missing Anisotropic Filtering
- Visual glitches when using Handles API
- The RGBA color values are inconsistent when comparing two identical colors set in the Inspector
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.