WEBGL build graphic glitch with square boxes

Has anyone run across this error effect with a webgl build? When a co-worker creates projects they keep getting this when publishing to webgl. I can re-create it on my computer when running their project.

What browser, OS and Unity version?
I see Gamma color space. Unless you absolutely HAVE to support WebGL v1 (deprecated now) switch to linear color space and webgl v2.

Unity 2021.3.13.f1. Chrome on Mac Venture. I think I tried that but I will again. Thanks!

Unfortunately the Linear color space did not help. So strange. I am able to build much more complex WEBGL projects without any problem. Just the projects from my co-worker are doing it.

There have been recent reports regarding such issues on M1 Macs. Check the last couple dozen threads on this forum for possible answers, if any.

Definitely try with 2022.2 because WebGL is undergoing technical improvements all the time. Be sure to use URP, not legacy render pipeline.

Since you have working projects I would check for any differences in player and quality settings and use of packages/render pipeline between these two projects.

1 Like

Thanks for your help. I really appreciate it.

Wow. My co-worker just tried it with Unity 2022 and the same thing happened. We are so stumped. Someone must have seen this effect before…

Hey, could you open a bug report so we can investigate?

I just started a new question, but I might be seeing the same thing. I see odd black artifacts on my surfaces when I make a WebGL build and try to run it in Chrome or Safari on macOS or iOS. I’m making a build using Unity 2021.3.23f1. OP, is this in the neighborhood of what you’re seeing?

I’m on Unity 2021.3.8f1 and having the same issue when building to WebGL. I’m also using LODs for all the objects. Running on M1 Mac

Hello! I got the same issue. Also M1 mac.

Tried in both Safari and Firefox. I’m using Unity 2022.3.0
Some video (a year old and without this exact issue) advised turning off a number of compression options for WebGL builds, which did not work. I just switched from gamma to linear and turned off WebGL1 support, and the problem persists.

edit: oh and I’m using URP forward+ renderer
edit2: As additional data, I recompiled an older WebGL game in unity 2021.3.8f1 on my M1 and it was totally fine. No graphics issues at all.
I went and installed the newest unity on my decade old intel macbook that barely functions, I compiled the current game project, and was able to run the localhost version in chrome with no graphics issues. After uploading it to itch.io and trying to run it on my M1, I encountered the same graphics issues.
edit3: oh also, I tried disabling both SSAO, and post processing, and had no change.

a bug report is the fastest way for us to investigate this :slight_smile: especially if you share the report number here

Okay, filed a bug report, IN-43465 Thanks for your time Ruba.

1 Like

I took a look at the project in the bug report and found that Depth Priming Mode in the URP renderer data settings is the culprit for causing the render to glitch. I changed the setting to Disabled and the game rendered correctly.

I’ll make a note to check with the URP team if there’s anything we can do about getting it to work on Mac M1/2 WebGL. For now, leaving the Depth Priming Mode setting Disabled is the workaround.

3 Likes

Oh awesome! Thanks for looking into it, and getting back to me!