Preloading all objects / all shaders for shader compile

Godot Version

4.6.1

Question

I’m looking a way to reduce stutter from compiling shaders on objects during runtime. Sure it’s one time, but that first time is crucial as the game is rather fast paced.
I’d read about a method that assigns each shader to a hidden object during a loading screen; however the issue is I have plenty of make_unique copies of the same shader, which aren’t technically distinct files, as res:// path is the specific .tscn

What I thought I’d do is load and instantiate() each scene with a shader, or just each scene, then free it, all hidden away by an initial loading screen. Get a DirAccess, and then just get_next() untill all is worked through. But maybe there’s a better/faster method? Game is not that big resource wise, just a few megabytes of pngs and a dozen more of sound effects.

Remember that load and preload also load stuff. Couldn’t you just make each shader object not being visible until loaded once. That way the shadercache is made per object. And unless you have insane shaders that shouldn’t cause any stutters.

(Just a guess though)

I do use preload on every object, but the stutter still happens, either at instantiate() or at add_child(), the one-off nature of the preload makes it hard to be certain. And the shader is very simple, just makes sprite blend with pure white for a split second hit flash effect.