Skip to content

How-ToGPU

How to Clear the Shader Cache in Windows 11 (NVIDIA, AMD and DirectX)

A corrupted shader cache can make games crash, stutter or show visual glitches. When clearing it helps, how to clear the DirectX Shader Cache with Disk Cleanup, NVIDIA's official steps for its own cache, and what to do on AMD.

By , Systems & Technical Editor

3 min read

How to Clear the Shader Cache in Windows 11 (NVIDIA, AMD and DirectX)

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

  1. Type disk cleanup in the taskbar search box and open Disk Cleanup.

  2. Choose your Windows drive (usually C:) and select OK.

  3. 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.

  4. 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:

  1. Open the NVIDIA App, select Graphics, then Global Settings.

  2. Find Shader Cache Size, set it to Off and select Apply.

  3. Restart your PC.

  4. Press Win + R, type %USERPROFILE%\AppData\Local and press Enter.

  5. Open the NVIDIA folder, then delete everything inside DXCache and GLCache.

  6. Go back to the Local folder, open NVIDIA Corporation, then delete everything inside NV_Cache.

  7. Reopen the NVIDIA App, set Shader Cache Size back to Driver Default (NVIDIA says this is currently 16GB) and select Apply.

  8. 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.

The bottom line

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.

Sources

  1. 01NVIDIA Support, Deleting NVIDIA Shader Cache files
  2. 02Microsoft DirectX-Specs, D3D12 Shader Cache APIs
  3. 03Microsoft Support, Free up drive space in Windows

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Fix a Mouse That Double-Clicks When You Click Once

How-To

How to Fix a Mouse That Double-Clicks When You Click Once

How to fix a mouse that double-clicks when you click once: check Windows' click and double-click speed settings, test in other apps, change USB port, clean the button and test on another PC, plus what to do if the mouse is faulty.

Marcus Thorne3 min

How to Use the Windows Backup App in Windows 11

How-To

How to Use the Windows Backup App in Windows 11

How to use the Windows Backup app in Windows 11 to save your folders to OneDrive and your apps, settings and Wi-Fi details to your Microsoft account, restore them on a new PC, change what's backed up and understand its limits.

Marcus Thorne3 min

How to Remove or Turn Off Copilot in Windows 11

How-To

How to Remove or Turn Off Copilot in Windows 11

How to remove or turn off Microsoft Copilot in Windows 11: uninstall the Copilot app in Settings or with PowerShell, change what the Copilot key does, and the AppLocker option Microsoft recommends for IT admins.

Marcus Thorne3 min

How to Translate Text Offline on Your PC with LibreTranslate

How-To

How to Translate Text Offline on Your PC with LibreTranslate

How to run LibreTranslate, a free and open-source translation service, on your own PC: install it with pip, load only the languages you need, translate in the browser or through its API, keep it local and add optional CUDA acceleration.

Marcus Thorne3 min