I just filed a bug about this, but wondering if others are experiencing the same issue.
I’m using URP 2D, and when I check “Use Depth/Stencil buffer” in my 2d config, the project builds but the player just shows a black screen and 100 of these in the console:
GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomplete.
Just unchecking the option to use stencil buffer fixes the issue.
I’m using the latest stable build of Unity (2020.2.1f12).
Anyone else experiencing this issue? Interestingly, I’m not even using anything in the scene that should require stencil buffers (e.g. sprite masks)…
Currently implementing a feature that requires the stencil buffer to use UI masking, so I hope there’s a fix incoming. I’ll update you if I can find a way to get it working, but it seems like “Use Depth/Stencil buffer” leads to a 100% broken WebGL build.
I filed a bug report with Unity, and they told me the bug will is fixed in 2021.
However they noted that a workaround is simply to change the color space from gamma to linear. As I understand it, there shouldn’t be an appreciable performance hit, but it does mean dropping WebGL 1 support (and thus safari for now). That’s what I’ve done in my project.
We are very much looking towards WebGL 2 today. It is unfortunate that Safari is outdated and does not offer WebGL 2 yet.
They do however have an experimental WebGL 2 support in Safari Tech Preview. One thing that would be amazing if you can try out, is whether your game works correctly if you download Safari Tech Preview, and in its experimental settings panel, enable WebGL 2. When doing the game build, mark its Graphics APIs to limit to only WebGL 2 so it won’t accidentally run against WebGL 1 on Safari.