⏱ 8 min read  ·  ✅ Updated Sep 2026
🔥Amazon Prime Day 2026 is coming — don’t miss the best deals.See Top Deals →

When a game freezes for two or three seconds every time you round a corner, enter a new area, or look at a previously unseen material, that is shader compilation stutter. It is not a texture streaming problem and it is not a storage bottleneck. The engine is compiling a new pipeline state object on the fly and blocking your frame loop until the result is ready.

This article focuses primarily on Unreal Engine 5 titles, which have dominated the complaint volume for “shader compilation stutter fix” since 2024 and remain the most common source of the problem in 2026. Star Wars Outlaws, Horizon Forbidden West PC, Hell is Us, and numerous other UE5 releases all exhibit the same underlying mechanism. The engine ships with a partial PSO cache that covers only a subset of shader permutations, so whenever your GPU hits a combination not yet in the cache, the runtime compiler takes over and you feel the hitch. Vulkan-based engines like id Tech 7 and some DX12 titles share the same root cause with different file layouts.

Likely Causes

Cause How to confirm Fix difficulty
PSO cache file missing or incomplete after a game update Check that %LOCALAPPDATA%\<GameName>\Saved\ contains a .pso or .upipelinecache file with a recent timestamp Low
Shader compilation occurring on the render thread instead of a worker thread Stutters happen only when new materials enter view, not during load screens Medium
GPU driver missing or outdated Vulkan shader compiler Vulkan titles show a persistent “Compiling Shaders” progress bar at launch that never finishes Low
Antivirus or Windows Defender scanning the shader cache directory on access Stutter duration is inconsistent; a disk I/O trace shows Defender.exe touching cache files Medium
CPU too slow to keep up with on-the-fly compilation Stutters persist even with a fresh full cache; Task Manager shows 100% on a single core during a hitch High
Game running from a mechanical drive and the engine cannot stream the cache fast enough Cache file exists but is fragmented; HD Tune or Defraggler shows high fragment count Medium

Fix 1: Delete and regenerate the PSO cache

How to check

Navigate to %LOCALAPPDATA%\<GameName>\Saved\ and look for files with extensions .pso, .upipelinecache, or .shk. If the file size is under 5 MB or the timestamp predates the last major patch, the cache is almost certainly incomplete.

What to do

Close the game. Delete all .pso and .upipelinecache files in that directory. Relaunch the game and play through the first two to three hours without alt-tabbing. The engine writes new cache entries as you encounter shaders. Avoid quitting to desktop during this period, as the cache flushes on clean exit.

How to undo it

No action needed. The game recreates the cache automatically on next launch.

Fix 2: Enable precompilation at startup via Engine.ini

How to check

Open %LOCALAPPDATA%\<GameName>\Saved\Config\Windows\Engine.ini in Notepad. Search for [ConsoleVariables]. If the key r.ShaderPipelineCache.Enabled=1 is absent or set to 0, precompilation may be disabled by default for your hardware configuration.

What to do

Add or edit the following under [ConsoleVariables]:

r.ShaderPipelineCache.Enabled=1
r.ShaderPipelineCache.PrecompileAtStartup=1

Save the file and launch the game. The first launch after this change will show a “Compiling shaders” progress bar that may take 10 to 25 minutes depending on your CPU and shader permutation count. Subsequent launches will be instant because the results are persisted.

How to undo it

Delete the two lines you added from Engine.ini, or delete the entire Engine.ini to revert to defaults.

Fix 3: Add a Steam launch option to force shader precompilation

How to check

Right-click the game in Steam, select Properties, then General. The Launch Options field should be empty or contain only unrelated flags.

What to do

Enter this in the Launch Options field:

-NoShaderCompileOnDemand

Some UE5 titles also accept -PreCompileShaders. Try the first flag, and if it is ignored, try the second. These force the engine to precompile known permutations at load rather than deferring to the render thread.

How to undo it

Clear the Launch Options field.

Fix 4: Exclude the shader cache directory from antivirus scanning

How to check

Open Windows Security, go to Virus & threat protection, click Manage settings, then scroll to Exclusions. If %LOCALAPPDATA%\<GameName>\Saved\ is not listed, Defender is scanning every cache read.

What to do

Add a folder exclusion for %LOCALAPPDATA%\<GameName>\Saved\. If you use third-party antivirus, add the equivalent path exclusion in that program’s settings. The exclusion should cover both read and write operations.

How to undo it

Remove the folder from the exclusion list.

Fix 5: Update your GPU driver and verify the shader compiler component

How to check

Open Device Manager, expand Display adapters, and note the driver version. Compare it against the latest available from NVIDIA, AMD, or Intel. Then open a Vulkan title and watch for the error string “VK_ERROR_INCOMPATIBLE_DRIVER” or “Failed to initialize shader compiler” in the log file at %LOCALAPPDATA%\<GameName>\Saved\Logs\.

What to do

Use DDU in safe mode to wipe the old driver, then install the latest WHQL or Game Ready package with the “Perform clean installation” checkbox ticked. This ensures the bundled shader compiler (DXC for DX12, the NVIDIA or AMD Vulkan compiler library) is updated alongside the kernel driver.

How to undo it

Reinstall the previous driver version using DDU again. There is no in-place rollback for the compiler component without a full reinstall.

Fix 6: Reduce shader permutation count by lowering visual settings

How to check

If you run all settings at Epic or Ultra, the engine must compile permutations for every lighting, shadow, and material quality combination. The total count can exceed 40,000 shaders in large UE5 open-world titles.

What to do

Lower one or more of the following from Epic to High: Global Illumination, Reflections, Volumetric Fog, or Shadow Quality. Each reduction removes an entire multiplier from the permutation matrix. The cache fills faster and the on-demand compilation window narrows.

How to undo it

Restore the settings to their previous values. The existing cache entries remain valid; the engine will simply need to compile new permutations when you revisit the higher quality tier.

Fix 7: Run the game from an NVMe SSD and defragment if stuck on HDD

How to check

Open the game’s installation path and verify the drive letter. If it is a spinning disk with 5400 RPM or 7200 RPM, random reads of the .pso file during gameplay can add latency on top of the actual compile time.

What to do

Move the game to an NVMe drive via the launcher’s “Move install folder” option, or do a fresh install on the faster volume. If moving is not possible, run a manual defragmentation pass on the HDD using the built-in Optimize Drives tool with the “Fragment consolidation” option.

How to undo it

Move the game back to the original drive using the same launcher mechanism.

Fix 8: Increase the shader compile thread count

How to check

Open Engine.ini and search for r.ShaderPipelineCache.AsyncCompile. Some UE5 titles default this to 0 on lower-core CPUs.

What to do

Under [ConsoleVariables] add:

r.ShaderPipelineCache.AsyncCompile=1
r.ShaderPipelineCache.NumThreads=4

Adjust NumThreads to roughly half your physical core count. This offloads compilation to background worker threads so the render thread continues producing frames.

How to undo it

Remove the added lines from Engine.ini.

If Nothing Works

On CPUs with fewer than six cores and no SMT, some UE5 titles simply cannot finish background compilation fast enough to keep up with shader encounter rate. In that scenario the practical options are limited to accepting the hitches, reducing settings further, or upgrading hardware. If you are on a six or eight core part and the problem persists across all fixes above, capture a RenderDoc frame during a stutter and compare the pipeline state creation call stack against a frame without stutter. That comparison will tell you whether the engine is genuinely stalling on ID3D12Device::CreateGraphicsPipelineState or whether something else masquerading as shader compilation is responsible.

FAQ

Why does the “Compiling Shaders” bar hang at 99%?

The last one percent often corresponds to a small set of complex permutations that require more VRAM than available. If the bar truly never completes, try reducing texture quality one notch. If it finishes after several minutes, the cache was just large and your CPU was still working through the queue.

Does deleting the cache make the game run better?

Not immediately. The first hours of play will be worse because every shader must be recompiled. After the cache is fully repopulated through normal play, performance should match or exceed the previous state if the old cache had corruption.

Do mods cause shader compilation stutter?

Yes, if the mod introduces custom materials, meshes, or blueprint logic that generates new shader permutations not present in the base game cache. UnrealPak-based mods and pak chunk replacements are the most common culprits. Remove the mod, regenerate the cache, then reinstall the mod and play through affected areas once more.

Is this the same as a CPU bottleneck?

Not exactly, though a slow CPU makes the stutter worse. A CPU bottleneck causes consistently low frame rates. Shader compilation stutter is a discrete one-to-three-second freeze at specific geographic locations in the game world, after which frame rate recovers fully. The two problems can coexist but have different root causes.

Explore Our Guides & Free Tools