Hello, i was wondering if i need to set up a shader pre-compilation step on the first boot up of my game (like the one hellblade 2 has, even though it’s in background during a cutscene) using the ShaderPipelineCache class.
I already have setup PSO Precaching and bundled PSO, but i can’t find any info related to a precompilation step.
The way i have set it up for now is pretty rough, i just call
FShaderPipelineCache::SetBatchMode(FShaderPipelineCache::BatchMode::Fast);
FShaderPipelineCache::ResumeBatching();
on the first load of the starting menu. But even without these calls i can see on the logs this:
[2024.07.09-11.07.30:923][ 0]LogRHI: Opened FPipelineCacheFile: ../../../MyProject/Content/PipelineCaches/Windows/MyProject_PCD3D_SM6.stable.upipelinecache (GUID: 93CE39CE4FFCEB789F0904A682E91E54) with 31 entries.
[2024.07.09-11.07.30:923][ 0]LogRHI: Display: FPipelineCacheFile[MyProject] opened MyProject, filename MyProject, guid 93CE39CE4FFCEB789F0904A682E91E54.
[2024.07.09-11.07.30:923][ 0]LogRHI: FShaderPipelineCache::BeginNextPrecompileCacheTask() - MyProjectbegining compile.
[2024.07.09-11.07.30:923][ 0]LogRHI: Display: FShaderPipelineCache starting pipeline cache 'MyProject' and enqueued 31 tasks for precompile. (cache contains 31, 31 eligible, 0 had missing shaders. 0 already compiled). BatchSize 50 and BatchTime 16.000000.
So to sum it up, should i bother with making a pre-compilation step like i’m doing right now or PSO Precaching and Bundles, and the engine itself, are already taking care of shaders for me?