Hey Unity Team,
For our next project we want to make use of the WebGL improvements made in 2021.2. I decided to convert a prototype from 2020.3 to 2021.2b15 using a few asset store packages we are planning to use. Converting the project broke most of the URP materials it was using (weird shading issues). I then recreated the prototype piece by piece in 2021.2, which then worked fine in editor. When I build for WebGL however, I get a couple of the following error:
“GLSL link error: FRAGMENT shader texture image units count exceeds MAX_TEXTURE_IMAGE_UNITS(16)
Note: Creation of internal variant of shader ‘Universal Render Pipeline/Terrain/Lit’ failed.”
And all the materials look weird again (the same way they did when I converted from 2020.3).
What’s also strange is that building takes over 30 minutes now (both clean as well as incremental), compared to 5 minutes tops in 2020.3. According to the progress UI it is spending most of that time stripping shader variants. I also tried to build for Windows. The build also takes over 30 minutes, but in that build there are no errors or shading issues.
I added the WebGL build in the link below so you can see what happens in build. I’m not allowed to post the project itself, but I added a video of what it looks like in editor/should look like.
( I checked other posts on the forum and one post suggested disabling ‘Optimize Mesh Data’ and ‘Vertex Compression’ in player settings. ‘Optimize Mesh Data’ was already disabled and disabling ‘Vertex Compression’ didn’t seem to have much of an influence either.)
Link to build + video of what it should look like:
https://drive.google.com/drive/folders/1Y7bXEon0DmRKcKuzhvU1d_APoD8dfulh?usp=sharing
Thanks,
Jolan Huyvaert (die Keure)