I see that the shader pre-warming system has been accomplished in 4.13 like the screenshot below.However,I still encounter obvious stuck when the material gets first rendered,eg.when spawning a particle at runtime(for the first render),the game will get stuck for a while(maybe 1s or 2s).
And when I dig into the runtime log in mobile devices,and I still find the lines saying:
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
Am I missing something to set?I have packaged the game with PC with metal enabled,and Have tested on iphone6 and iPhone 6s.Both have this issue.
Thanks!
Are you packaging on PC or mac?
The caching of shaders for metal only works for OSX builds. (unless this fix is supposed to be for windows builds, as most shaders were already being cached pre-4.13)
Hey ,
Can you provide me with the steps you took when setting up your project along with the settings you enabled/disabled specifically for the Shader Caching?
Since it is newly implemented the documentation is a bit light, but I see we actually removed shader caching by default on Macs. Disabled the Shader Cache by default on Mac to match other platforms as it was not designed to support the new RHI Thread & Parallel Execution features of Unreal Engine 4.
Let me know if you have further questions or need additional assistance.
Cheers,
So I looped in some additional eyes on this issue for clarification and we actually have some overlapping information within our documentation that could be confusing. I am entering some tickets to have these features and workflows clarified.
4.13 does have a new system for Android OpenGL ES which lets the device save the shaders it compiles to the device the first time you run. So you’ll get slow loading and hitches the very first time, but not on subsequent runs.
If you’re using Metal on iOS, it should be possible to compile the shaders on a Mac during cooking which should completely remove the hitches. You will need to compile your shaders on a Mac in order for the shader caching to work for iOS Metal.
Let me know if you have further questions or need additional assistance.
Cheers,