Anyone got a lead on making a "Preparing Shaders" screen in a shipped build?

Hey all!

Looking for any leads on a shader compilation screen that is used is most modern games. I know there is an Asset on the store for it, but this is so common now in most games one would think it’d be easier to find a tutorial for it.

Examples:
Hogwarts Legacy
Last of Us
Dragon Age Veilguard

Example (from Hogwarts):

I know this has been asked before, but those threads are dated now, and I couldn’t find any real direction.

Thanks!

1 Like

I see this

https://www.fab.com/listings/79e9223a-07bf-4480-a9f9-ba944470f0b5

Interested in other answers… :slight_smile:

1 Like

Hey there @KungFuBrad! I couldn’t find up to date resources on the matter myself either. Admittedly I’ve only precached the shaders the old way, so when it comes to the newer asynchronous shader compiler, I’m uncertain of the mechanisms at play. I would look into the FShaderCompilingManager in the source to determine more.

1 Like

Thanks, and yes, this is the asset out there that I’ve seen too.

Which means there’s a way to do it!

Definitely looking for a way to put it together myself, this must be sort of like OOtB by now.

But thank you still!

Cool thank you, will do some digging and come back!

1 Like

Just buy the asset and pick it apart to learn how the underlying system works.
Then build your own. As long as you don’t copy the code from the original asset, that’s fine!

This isn’t my area of expertise, but just dropping some links that might help. I remember seeing resources from Joe Wintergreen on their blog post: “Unreal Scoop: Making a ‘Compiling Shaders…’ Screen” which has a small tutorial on retrieving the number of shaders awaiting precompilation.

To get to that point though, you’ll need to look over the new PSO caching stuff which is discussed in the docs here and tutorialized by Tom Looman here, as noted by Joe.

Coincidentally, the history and future of this stuff was covered today on the UE Tech Blog: “Game engines and shader stuttering: Unreal Engine’s solution to the problem”.

1 Like

This is what I ended up doing, the asset itself is inexpensive and even if I can’t pull it apart, I’m sure I can reskin it.

Thanks all for the help!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.