Games compile shaders (small programs that run on your graphics card) for your specific GPU and driver, and Windows and your GPU driver save the results in a shader cache so they don't have to be rebuilt every time. Usually that's a good thing. But if the cache becomes corrupted, it can cause crashes, poor performance or visual glitches. This guide is based on NVIDIA's and Microsoft's documentation.
When clearing the shader cache helps
NVIDIA says damaged shader cache files "may cause applications or games to crash on launch, exhibit lower performance, or display visual artifacts". It's worth clearing the cache if:
a game started crashing on launch after a driver or game update;
you see corrupted textures or flickering that other fixes haven't solved;
you're troubleshooting stuttering in PC games and have already ruled out the usual causes.
NVIDIA says the files are recreated automatically the next time an application or game is launched, so expect the first launch of each game to take longer while shaders are rebuilt.
What's in the cache
Microsoft's DirectX documentation explains that Windows 10 has included a DirectX Shader Cache component (D3DSCache) for several years, which can be used as an alternative to GPU makers' own custom shader caches. That's why there can be more than one cache to clear. ## Clear the DirectX Shader Cache with Disk Cleanup
Type disk cleanup in the taskbar search box and open Disk Cleanup.
Choose your Windows drive (usually C:) and select OK.
Tick DirectX Shader Cache if it appears in the list of files to delete. You can untick everything else if you only want to clear the shader cache.
Select OK, then Delete files.
Microsoft's storage guide also covers Disk Cleanup and Storage Sense; see our guide to Storage Sense in Windows 11 if you want Windows to clear temporary files automatically.
Clear the NVIDIA shader cache
NVIDIA's support article recommends turning the cache off before deleting the files:
Open the NVIDIA App, select Graphics, then Global Settings.
Find Shader Cache Size, set it to Off and select Apply.
Restart your PC.
Press Win + R, type %USERPROFILE%\AppData\Local and press Enter.
Open the NVIDIA folder, then delete everything inside DXCache and GLCache.
Go back to the Local folder, open NVIDIA Corporation, then delete everything inside NV_Cache.
Reopen the NVIDIA App, set Shader Cache Size back to Driver Default (NVIDIA says this is currently 16GB) and select Apply.
Restart your PC again.
NVIDIA also says you can use the free Display Driver Uninstaller (DDU) tool's Clean Shader Cache (Only) option instead of deleting the folders manually. If you're already planning a clean driver install, our DDU guide covers the full process.
Clear the AMD shader cache
AMD Software: Adrenalin Edition includes its own shader cache reset option in its graphics settings. We couldn't confirm the current menu path from an AMD page for this guide, so check AMD's support site for your driver version, and use AMD's option rather than deleting driver folders by hand.
Don't make it a habit
Clearing the shader cache is a troubleshooting step, not routine maintenance. NVIDIA's own advice is to set the cache back to the default size afterwards, and it notes that larger sizes can help with bigger game libraries. If a problem comes back after clearing the cache, try updating your graphics driver or look at our guide to fixing games that crash.
Our verdict
If a game has started crashing, glitching or stuttering after an update, clearing the shader cache is a quick, safe fix to try: use Disk Cleanup for the DirectX Shader Cache, and follow NVIDIA's steps (or AMD's reset option) for the driver cache. Put the cache size back to default afterwards and expect the first launch of each game to take longer while shaders rebuild.