Guides/Graphics
Shader compilation stutter: why games stutter after updates
A new game stutters every time a new effect appears, then gets smooth after an hour. After a driver update it starts again. That's shader compilation, and it has nothing to do with how fast your PC is.
What happens#
Shaders are small programs that run on the graphics card. Games ship them in a general form, and the driver translates them for your exact card and driver version. In DirectX 12 and Vulkan games, that translation often happens the first time an effect is used, in the middle of gameplay, and the frame waits for it. The result is saved in the shader cache, so the second time is smooth.
A new graphics driver or a game update makes the old cache invalid, so the stutter comes back once.
What you can do#
- Let pre-compilation finish: many games compile shaders at startup (“Compiling shaders 43%”). Wait for it in the menu instead of skipping it.
- Keep the shader cache on and big enough: NVIDIA Control Panel → Manage 3D settings → Shader Cache Size: Driver Default is fine for most, a larger size or Unlimited helps if you play many big games. AMD keeps its shader cache on by default.
- Don't delete the cache: Windows Disk Cleanup and Storage Sense offer to delete the DirectX Shader Cache. Doing that forces every game to compile again. Untick it.
- Play from an SSD: the cache and the game's files load faster.
Questions#
Why do games stutter after a driver update?
Should I clear the shader cache to fix stutter?
Frametide has the NVIDIA shader cache size, the AMD shader cache and a switch that keeps Windows from deleting the DirectX shader cache, under Tweaks (some need Premium). Frametide measures FPS, 1% and 0.1% lows and stutters per minute in your own game with PresentMon, before and after a change, so you don't have to guess (Premium).