# How to Enable Automated Pso Caching in UE 5.1?

**URL:** <https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218>\
**Category:** Rendering\
**Tags:** compiling-shaders, UE-5, unreal-engine, question\
**Created:** [March 17, 2023, 7:37pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218 "2023-03-17T19:37:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![GV-Rafael-III](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GV-Rafael-III](https://forums.unrealengine.com/u/GV-Rafael-III)\
**Post date:** [March 17, 2023, 7:37pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/1 "2023-03-17T19:37:05Z")

</div>

Improvements to PSO precaching is mentioned on Epic’s public roadmap for UE 5.2, so I figure now is as good a time as any to ask about this. Apparently UE 5.1 introduced some sort of automatic PSO caching process to help address shader compilation stutters, but I have not been able to find any information on how it works, how to activate it, or even how to tell if it’s happened at all.

To my knowledge, Epic has not created any documentation for this feature. In fact, the documentation on PSO caching itself hasn’t been updated since UE 4.26. Is there anyone who can shed light on this for me?

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [March 17, 2023, 8:50pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/2 "2023-03-17T20:50:01Z")

</div>

shader pipelines are not that easy to deal with. even if you cache them on disk, you gotta reload them for all the shader permutations used in the level and link the shaders at runtime. generation on the fly is just as fast. hmm. a necessaty evil atm.

if you’d static link all shader permutations you’d get alot of redundant shader code data. shaders are fairly small pieces of code, but… alot them can make a difference.

not sure. ohh well…

word of advice… use less material variations and more material instances. if understand their concept they are gold, really. if you need special shaders make sure to recycle their code. fairly ez deal.

---

<div class="post-metadata">

**Author:** ![GV-Rafael-III](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GV-Rafael-III](https://forums.unrealengine.com/u/GV-Rafael-III)\
**Post date:** [March 18, 2023, 1:12am UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/3 "2023-03-18T01:12:02Z")

</div>

I appreciate the insight, and I have heard about how helpful the use of material instances can be. However, answers like yours are part of the reason why I’m concerned about Epic’s lack of transparency 😅

I’m a long ways off from making anything complex enough for shader complication stutter to be an issue, but with the subject coming up more and more I’d like to learn how I can mitigate or avoid it when the time comes. Epic simply saying “we’re doing automated PSO caching” and then walking out the door just isn’t enough for me.

---

<div class="post-metadata">

**Author:** ![jaker3278](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jaker3278](https://forums.unrealengine.com/u/jaker3278)\
**Post date:** [May 15, 2023, 9:30pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/4 "2023-05-15T21:30:17Z")

</div>

The documentation is here, [https://docs.unrealengine.com/5.0/en-US/optimizing-rendering-with-pso-caches-in-unreal-engine/](https://docs.unrealengine.com/5.0/en-US/optimizing-rendering-with-pso-caches-in-unreal-engine/)

I am doing this at the moment for my game and have successfully collected the caches while playing the game. I am stuck at the point where I have to covert the PSO cache also know as expansion using a cmd commandlet. If you do get to this point please tell me how it works.

---

<div class="post-metadata">

**Author:** ![GV-Rafael-III](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GV-Rafael-III](https://forums.unrealengine.com/u/GV-Rafael-III)\
**Post date:** [May 15, 2023, 9:53pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/5 "2023-05-15T21:53:12Z")

</div>

That’s the documentation for collecting PSOs manually; what I’ve been referring to is an automated PSO-gathering process that was supposedly introduced in UE 5.1. And part of the release notes for UE 5.2 state that Epic has improved it. Yet you can’t find anything on the Internet on _how_ it works, or how a developer can even tell that PSOs are being gathered automatically.

For all I know, Epic could be lying about the entire thing…though I don’t actually believe that they are. But they haven’t made any information about the automated PSO caching public, which to me is problematic because shader compilation stutter is plaguing games both large and small. Hiding information about the most recent ways it’s been addressed is helping no one.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [May 30, 2023, 10:48pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/6 "2023-05-30T22:48:24Z")

</div>

In the documentation the is a suggestion for a workaround.  
After looking at the backed code assets all call PrecachePSOs(); on post load which later calls CollectPSOPrecacheData() with parameters.

I hope they make a tool that gathers objects in a level and potential streams and automates the process in the future.

> **Do I need to make special PSO caching levels?**
> 
> While you can capture all needed PSO data from your project’s standard levels, some projects may benefit from creating special PSO capture levels. These levels can be set up so they spawn all assets of a particular type and then capture their PSO data. This is especially true if your project has content that takes time to unlock or is dynamically spawned."

Also this thread might give a clue, it seems there is a shaderpipelinecachetools commandlet

> [@Error Message when running PSO Cache 'ShaderPipelineCacheTools' commandlet.](https://forums.unrealengine.com/t/error-message-when-running-pso-cache-shaderpipelinecachetools-commandlet/1165532):
>
> 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](https://docs.unrealengine.com/5.1/en-US/optimizing-rendering-with-pso-caches-in-unreal-engine/) When I run the Run the ShaderPipelineCacheTools commandlet using the arguments below. E:\Epic Games\Engine\UE\_5.1\Engine\Binaries\Win64\>UnrealEditor-Cmd.exe -run=ShaderPipelineCacheTools expand C:\PSOCache\*.rec.upipelinecache C:\PSOCache\*.shk C:\PSOCacheTEST\_HighTown51\_PCD3D\_SM…

---

<div class="post-metadata">

**Author:** ![OSE\_maitland](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OSE\_maitland](https://forums.unrealengine.com/u/OSE_maitland)\
**Post date:** [February 8, 2024, 5:24am UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/7 "2024-02-08T05:24:10Z")

</div>

The commandlet is for processing the data after collection.

I found this, but I have not tried it yet: [Setting up PSO Precaching & Bundled PSOs for Unreal Engine - Tom Looman](https://www.tomlooman.com/psocaching-unreal-engine/)

---

<div class="post-metadata">

**Author:** ![GV-Rafael-III](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GV-Rafael-III](https://forums.unrealengine.com/u/GV-Rafael-III)\
**Post date:** [April 6, 2024, 1:43pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/8 "2024-04-06T13:43:29Z")

</div>

I saw that around the time Tom first posted it, and it was a godsend! Following his instructions got me the results I was looking for.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 6, 2024, 1:43pm UTC](https://forums.unrealengine.com/t/how-to-enable-automated-pso-caching-in-ue-5-1/793218/9 "2024-05-06T13:43:49Z")

</div>

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