We’re following the recommended approach for handling PSO precaching, similar to what Fortnite does. Specifically, we track
PipelineStateCache::NumActivePrecacheRequests()
and hold the loading screen until all requests are completed.Our Current Flow:
- We start in a main menu level (a World Composition level).
- From here, players choose a game mode:
- Singleplayer
- Multiplayer
- Load Game, etc.
- Once a choice is made, we load the corresponding main level with the appropriate session settings.
This process triggers a second batch of PSO precaching requests, which makes sense since we’re transitioning to a new level with new materials. However, I have some questions about optimizing this for a better user experience.
Questions:
Can PSO precaching be batched across multiple levels?
- Ideally, I’d like to request precaching for both the main menu and the main level at the same time, similar to games that show a single “Compiling Shaders” screen.
- I’d prefer to avoid restructuring assets or packing main-level content into the menu level.
- In Fortnite, I don’t recall seeing two separate loading bars—does FN handle this differently?
Dynamic Shader Loading in 5.5
- I tested enabling Dynamic Shader Loading, and it produces the expected flow, but we send less than half the usual PSO requests and hit many more new PSOs. This aligns with the feature’s expected behavior, given its name and fallback strategies.
- I also enabled DrawnComponentBoostStrategy and haven’t noticed default materials popping in.
- Is this setup similar to what FN uses, and are we leveraging these parameters correctly?
Reusing the PSO Cache Between Processes
- We’re running multiplayer automated tests, and I’ve noticed that when a second client joins after the first, it still fires all the same PSO precache requests that the first client already processed.
- However, when I run with r.ShaderPipelineCache.Open=1 it seems to skip this process for the second client. I wanted to check if this is the recommended approach, or if there is a more proper way you’d advise handling this.
Any insight into best practices for this would be greatly appreciated!