Thanks!
In a native Metal workflow you're absolutely right, offline shader compilation could eliminate the freeze entirely.
However in Godot, shaders are written in GLSL and compiled to SPIR-V as a cross-platform intermediate format,
and then at runtime MoltenVK or Godot's Metal backend translates that SPIR-V to MSL, and compiles the Metal PSOs at runtime on the device.
This needs to happen at runtime cause the translated output can vary per device/driver,
and Godot also generates shader variants based on scene content, so the full set of required shaders may not be known at build time.
The compiled PSOs are cached after first launch, which is why subsequent launches are fast;
but that first-launch freeze is currently a known limitation of Godot's Metal backend specifically.
-My Audio App works Perfectly as good with all three APIs on my iPhone 12, iOS 26.
So it's not a matter of porting it but,
making the best decision that will comply with Apple policy, and will give the Best experience to iOS users!
If it wasn't for the Compilation Freeze, there will be no question: Metal!
Even tho it may have a bigger CPU hit, it's the official API and makes all the sense.
But yeah, alas fact of the matter is,
right now OpenGL or Vulkan/MoltenVK are giving a better experience. - No Freeze!
And that's the situation!
-If OpenGL is not Forbidden, and the app won't be flagged in the Review process..
Then it's a pretty considerable solution, as it gives the best performance and user experience atm.. right?
So maybe I could use OpenGL until the Compilation Freeze aspect is improved in Godot?
-Being a Pro Audio app,
the 5 seconds freeze on first launch can make new users think it's Broken or smth.. right?
And I dont think there's a way to show a specific "Compiling Shaders" message on init;
But I will investigate that, and see if multiple bootsplash images can be used in Godot..
-As a side note..
I've already made some improvements to Godot's Metal implementation with Claude+Grok;
Just modernizing the CADisplayLink frame rate API from the deprecated preferredFramesPerSecond to the modern preferredFrameRateRange, which reduced CPU overhead a bit..
But the shader Compilation Freeze is a deeper issue that would require changes to Godot's Metal PSO pipeline itself.. which I know nothing about!
I just bought a macbook m3 two months ago, and here we are..! :)
Topic:
Graphics & Games
SubTopic:
General
Tags: