Desktop Safari on mac doesn't work: WebGL: INVALID_FRAMEBUFFER_OPERATION

I’m on Mac OS 10.15.7 and Safari 13.1.3 (15609.4.1) doesn’t render my babylon.js content. Chrome renders my site fine on both Mac, Windows, and it also works on iOS, but Safari on Mac OS flat-out refuses to work. I tried disabling post-processing, but it didn’t make a difference.

Here’s a link to my work-in-progress:

I get this error: “WebGL: INVALID_FRAMEBUFFER_OPERATION: drawElements: attachment type is not correct for attachment”

I tested some of the demos on babylon.js’s homepage (https://www.babylonjs.com/) in Safari to see if it was just my code, and I found that the Underwater demo (while it works) generates the same errors in Safari. The RAF demo flat out refuses to work, similar to what I’m experiencing. Weapons demo works, but with errors in the console. Retroplanet doesn’t work at all, failing almost exactly like my site. Some other demos didn’t work either but those seemed due to missing files or cross-domain policies so I ignored those.

My code seems to run just fine everywhere else I’ve tested except Safari on Mac OS. If I can’t fix this, my next step is going to be to either re-write my 3D code using three.js (which I’m not looking forward to, since I used Unity 3D to export the .babylon scene file), or to detect desktop versions of safari and show alternative content instead.

The scene I’m loading is quite simple, just PBR materials with simple colors (no textures) and one .dds environment map. Post-processing is also simple, with just some bloom using the default pipeline. I don’t use any lights, relying only on the environment texture. It all works pretty well, getting good framerates, everywhere except Safari on Mac OS.

So, help?

adding @Cedric

Tested ok on Safari 14 15610.1.28.9, 15610. webgl 1
Maybe @sebavan has an older version installed

Works for me as well on 14 I do not have 13 anymore unfortunately :frowning:

Hi. Before you create engine in your code


you need check if browser safari create engine with disablewebgl2support : true

Or if other browser create engine with disablewebgl2support : false // default option