Clear Shader Cache on Windows: Guide and Fixes
In this article
Clearing the shader cache on Windows removes pre-compiled GPU instructions that may have become corrupted or outdated, effectively forcing your graphics card to rebuild them from scratch. This process is primarily used to resolve visual glitches, eliminate stuttering (shader compilation stutter), and fix crashing issues that occur after a GPU driver update or a game patch. By purging these temporary files, you ensure that the game is using the most current and stable instructions compatible with your current hardware and software configuration.
What You'll Need
- A computer running Windows 10 or Windows 11.
- Administrative privileges to access system folders and Disk Cleanup.
- Knowledge of your GPU brand (NVIDIA, AMD, or Intel) to locate the specific cache folders.
- A restart of your system after the process to ensure all changes take effect.
Step-by-Step
- Use Windows Disk Cleanup for DirectX Shader Cache:
The most universal way to clear the general Windows shader cache is through the built-in Disk Cleanup tool. Press the Windows Key, type "Disk Cleanup", and select the application from the results. Once the window opens, select your primary drive (usually C:). In the list of files to delete, uncheck everything except "DirectX Shader Cache". Click OK and then Confirm to delete the files. This removes the general cache used by the DirectX API across various applications.
- Clear NVIDIA Shader Cache (For NVIDIA Users):
NVIDIA stores shaders in specific folders that Disk Cleanup might not fully purge. Open File Explorer and navigate to the following path:
%LocalAppData%\NVIDIA\DXCache. You can paste this directly into the address bar. Once inside, select all files and folders and delete them. If some files are "in use" and cannot be deleted, skip them or close all background applications (including the NVIDIA Control Panel and any open games) and try again. Additionally, check%LocalAppData%\NVIDIA\GLCachefor OpenGL-specific shaders and clear those as well. - Clear AMD Shader Cache (For AMD Users):
AMD users can clear their cache through the Radeon Software. Open the AMD Software: Adrenalin Edition. Click on the Settings (gear icon) in the top right corner. Navigate to the "Graphics" tab. Scroll down to the bottom to find "Advanced". Look for the "Reset Shader Cache" option and click "Perform Reset". This is the safest and most effective method for AMD hardware as it handles the file deletion internally.
- Clear Intel Shader Cache (For Intel Integrated Graphics):
Intel graphics typically rely heavily on the Windows DirectX Shader Cache cleared in Step 1. However, you can also ensure a clean slate by updating the Intel Graphics Driver via the Intel Driver & Support Assistant, which often flushes the cache during the installation process. If you prefer manual deletion, check the
%LocalAppData%folder for any Intel-specific graphics folders that contain a "Cache" subdirectory. - Clear Game-Specific Shader Caches:
Some modern AAA titles (like Call of Duty, Elden Ring, or Horizon Zero Dawn) manage their own shader caches independently of the OS. These are often found in the game's installation folder under a folder named "shaders" or within the
%AppData%folder under the game developer's name. If you are experiencing issues with only one specific game, locate that game's local folder and delete the shader cache files specifically for that title. - Restart Your Computer:
After performing these deletions, restart your PC. This ensures that no locked files remain in memory and that the GPU is ready to begin a fresh compilation process the next time you launch a game.
Common Mistakes
One of the most frequent mistakes is deleting the entire NVIDIA or AMD folder rather than just the "Cache" subfolder. Deleting configuration files or driver binaries can lead to system instability or require a full driver reinstallation. Always ensure you are inside the specific folder labeled "Cache" or "DXCache" before hitting delete.
Another common error is attempting to delete cache files while a game or a GPU-intensive application (like a video editor) is still running. Because the GPU is actively reading these files, Windows will block the deletion, leading users to believe the process failed. Always close all background apps, including overlays like Discord or Steam, to ensure maximum file access.
Some users mistakenly believe that clearing the shader cache will permanently stop stuttering. It is important to understand that the first time you launch a game after clearing the cache, you will likely experience more stuttering for a few minutes. This is because the GPU is rebuilding the cache in real-time. This is normal behavior and not a sign that the process failed.
Tips
To prevent shader corruption in the future, always keep your GPU drivers updated. Most driver updates include a mechanism to invalidate the old cache, but occasionally a "clean install" (using a tool like DDU - Display Driver Uninstaller) is necessary if you are switching from one GPU brand to another.
If you have a very fast NVMe SSD, the impact of rebuilding shaders is minimal. However, if you are running games from a mechanical HDD, the initial shader compilation can be quite slow. In these cases, let the game sit at the main menu if there is a "Compiling Shaders" progress bar; forcing your way into the gameplay before this finishes will result in severe frame drops.
For NVIDIA users, you can actually increase the size of the shader cache in the NVIDIA Control Panel. Go to "Manage 3D Settings" > "Global Settings" and find "Shader Cache Size". Changing this from "Driver Default" to "10GB" or "Unlimited" can help reduce the frequency of shaders being deleted and rebuilt, which can diminish stuttering in games with massive open worlds.
Troubleshooting
If you find that you cannot delete files in the DXCache folder even after closing all programs, it is likely because the Windows Desktop Window Manager (dwm.exe) or the GPU driver service is holding them. To fix this, boot your computer into "Safe Mode". In Safe Mode, only essential drivers are loaded, allowing you to delete the cache files without "File in Use" errors. Once deleted, restart normally.
If clearing the cache does not resolve your graphical glitches (such as flickering textures or "black blocks" on screen), the issue may not be the cache but rather the driver version itself. Try performing a clean installation of the latest stable driver. If the problem persists across multiple driver versions, it could indicate a hardware issue with the GPU's VRAM.
In cases where a game continues to crash immediately after clearing the cache, check if your disk is full. Shader caches require a small amount of free space to be written to the drive. If your C: drive is completely full, the game will fail to write the new shaders, leading to a crash loop. Ensure you have at least 5-10GB of free space on your system drive.
Frequently Asked Questions
Will clearing my shader cache delete my game saves?
No. Shader caches are temporary files used by the GPU to render graphics. They are completely separate from your save files, configuration settings, and game progress, which are typically stored in the "Documents" folder or the Steam Cloud.
How often should I clear my shader cache?
You should not clear it on a regular schedule. Only do so when you encounter specific problems, such as visual artifacts, frequent crashes after a driver update, or significant performance degradation in a game that previously ran smoothly.
Does clearing the shader cache improve FPS?
It generally does not increase your maximum FPS. Instead, it improves "frame pacing" and removes stutters. By removing corrupted shaders, you ensure the GPU isn't struggling with incorrect instructions, which leads to a smoother, more consistent experience.
Is it safe to delete these files?
Yes, it is entirely safe. Shader caches are designed to be temporary. If they are deleted, the system simply generates new ones the next time the application is launched. There is no risk of permanent data loss or system damage.
Why is my game stuttering more after I cleared the cache?
This is expected. The stuttering occurs because the GPU is compiling new shaders as you encounter new objects and environments in the game. Once the new cache is built, the stuttering will disappear and the performance will return to normal.