Unity Issue Tracker - Instanced URP Shaders using Spherical harmonics variables causes long initial mesh render time when used in WebGL
Fixed
UUM-6390
Instanced URP Shaders using Spherical harmonics variables causes long initial mesh render time when used in WebGL
Unity: WebGL
Backport
Fixed
2021.3.X
2020.3.X
Won't Fix
2022.1.X
2022.1 is no longer accepting changes, so this port is not able to be executed for that branch. Cancelling port.
How to reproduce:
1. Open the attached project "DrawMeshLongFirstCallURP.zip"
2. Open the "BrokenShaderScene" Scene
3. Open the Build Settings (File > Build Settings...)
4. Make sure the WebGL platform is selected
5. Build And Run
Expected result: Both Shader's load time is close to each other
Actual result: The Shader that uses the Spherical harmonics variables loads 19 seconds later
Tested on: Google Chrome version 99.0.4844.83 (Official Build) (x86_64), Safari version 15.3 (17612.4.9.1.8)