Replies: 2 comments
-
Shader cache is implemented for OpenGL through the Not sure about metal, but we could potentially do the same for compiled pipelines for Vulkan. That's currently a low priority item for the team though. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Okay, thanks, I will not rely on this happening anytime soon. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It looks like when using JIT shaders, compilation occurs inside the call to e.g. AssetLoader::createInstancedAsset(). Since this function has to be called on the renderer thread, the latency cost of the compilation has to be paid then and there, and thus shader stutter is unavoidable (unless all materials are pre-loaded, in which case the up-front loading time is increased).
Are there any plans to move the compilation to some kind of async/background thread? Or if this is difficult due to e.g. the Vulkan APIs, has anyone put any thought into caching the compilation results on disk so that the next load could be faster?
I guess maybe the answer here is "use ubershaders" but it seems plausible that this could be avoided in many cases with async/disk-cached shader compilation.
Beta Was this translation helpful? Give feedback.
All reactions