[SOLVED] Failed to link shader program on 1.64 - Safari 15.1

Hi,

Engine Version 1.64.0 and 1.64.1 give me the following shader error on startup of the Editor and built apps, resulting in a black screen:

“Failed to link shader program. Error: Internal error compiling shader with Metal backend.”

System: macOS 12.0.1 MacBook Air M1
Browser: Version 15.1 (17612.2.9.1.20)

If I switch back to 1.63.6 or to “Prefer WebGL 1.0” everything works fine.
I guess a macOS/Safari upgrade will fix the issue, but it seems to break on outdated Macs for now.

Hope this helps,
Tom

Are you able to share some repro? Link to your published build? (even privately).

It’s strange that the shaders compile, but do not link, that seems more like an issue with Safari.
Is it all working ok in Chrome / Firefox?

Its happening with every project I open. Also with the “Blank Project” template like:
https://playcanvas.com/editor/scene/1788047

Everything works fine on Win/Firefox/Chrome. I am currently upgrading macOS to the latest version and will report if that fixes the issue asap.

1 Like

It all works on my M1 Max on 13.4.1

Yep just finished upgrading to macOS to 13.4.1 and everything works. I did not change anything else.

In other words, 1.64 will not work on MacOS 12.0.1 (apparently) and I have no machine to backtest.

I created a ticket for this Possible issue compiling PlayCanvas shaders on slightly older versions of Safari · Issue #5452 · playcanvas/engine · GitHub

1 Like

Hi,
I’m facing the same issue on Ipads, I’m actually getting different results based on model, year and OS
Happening on :
iPad 9.7 6th Gen - iOS 15
iPad Pro 12.9 2018 v15.3

Not happening on:
iPad Pro 11 2021 iOS 14.5
iPad 10th iOS 16.0
iPad Pro 12.9 2021 v14.5

It’s not happening on iPad Pro 12.9 2021 v14.5 but it is happening on iPad Pro 12.9 2018 v15.3 so it might be hardware related?
Hope this helps!

1 Like

@Benosse Thanks, that was very useful in finding a repro.
The fix is here, we’ll be releasing it soon: [Fix] Workaround for shader compile issue on iOS 15 related to MRT by mvaligursky · Pull Request #5459 · playcanvas/engine · GitHub

1 Like

Just to close this out, the fix was deployed yesterday as part of the 1.64.3 release. :smile:

1 Like