Hello, I am following documentation on how to use PSO caching and I am running into an error message when I am converting PSO Caches (also known as expansion). The link to the documentation is here. UE5 PSO documentation When I run the Run the ShaderPipelineCacheTools commandlet using the arguments below.
I get the following error message. I have tried putting the PSOCache folder in the E: drive and running the cmd as administrator. But to no avail. Any help would be welcome. Has anyone successfully done this yet in UE 5.1.
I have solved this problem now. I can let you know the answer tomorrow as I am away from my PC. There where a couple of things wrong in the documentation.
I just read your post and your follow up. Were you able to resolve this? If so, any information you can provide for future reference will help the community. Thank you!
In the section Setup and Required Settings - Set the following value in your Engine.ini file:
[DevOptions.Shaders]
NeedsShaderStableKeys=true ,this needs to be True capital “T”
Converting PSO Caches (also known as expansion)
Here is my working commandlet
E:\Epic Games\Engine\UE_5.1\Engine\Binaries\Win64>UnrealEditor-Cmd.exe “E:\Epic Games Projects\HighTown UE5.1 Post ALS\HighTown51.uproject” -run=ShaderPipelineCacheTools expand C:\PSOCache*.rec.upipelinecache C:\PSOCache*.shk C:\PSOCache\TEST_HighTown51_PCD3D_SM6.spc
Please note the " \ " after PSOCache that are not there in the documentation. This will produce the .spc certificate.
Here is my commandlet
E:\UE_5.1\Engine\Binaries\Win64\UnrealEditor-Cmd.exe “E:\PolyCoreUE5\PolyCoreUE5.uproject” -run=ShaderPipelineCacheTools expand C:\PSOCache*.rec.upipelinecache C:\PSOCache*.shk C:\PSOCache\TEST_PolyCoreUE5_PCD3D_SM6.spc
I recooked project and then recollect .rec.upipelinecache but is still doesnt work. Shader Tool works but is says that no one job was done. It doesnt create .spc file
Do you have the .shk files in the folder as well? The PSOCache folder should look something like this. Mine has the .spc certificate in there as well after generation, yours wont.
Added "" after the folder like this:
expand C:\PSOCache*.rec.upipelinecache C:\PSOCache*.shk C:\PSOCache\TEST_PolyCoreUE5_PCD3D_SM5.spc
Build included certificate and i waited fps boost for my VR app, but nothing interesting happened. I checked RHI logs. It opened .stable.upipelinecache file with correct entries (which was included while cooking). Also checked windows-desktop setup and it looks like with included PSOs in showed less FPS on D3D12 than simple with DLSS on D3D11.
Its not supposed to give you an fps boost, PSO caching works by first creating a list of all the needed Shaders that are required by the [Materials] that are used in your UE project. This list is then used to help speed up the compiling process of these Shaders when they are first encountered by your UE project. This, in turn, helps reduce any hitches your project might encounter when a Material requires a new Shader to be compiled.
So your game should now run smoother with no micro hitches, your players will thank you for it.
The \ must be before *.
My script which works:
E:\UnrealEngine\Engine\Binaries\Win64\UnrealEditor-Cmd.exe E:\MyProject\MyProject.uproject -run=ShaderPipelineCacheTools expand E:\MyProject\Build\Windows\MyProject\Saved\CollectedPSOs_Copy/*.rec.upipelinecache E:\MyProject\Build\Windows\MyProject\Saved\CollectedPSOs_Copy/*.shk E:\MyProject\Build\Windows\MyProject\Saved\CollectedPSOs_Copy\PSOCacheTest_MyProject_PCD3D_SM6.spc