How to Clear NVIDIA Shader Cache
In this article
To clear the NVIDIA shader cache, you must manually delete the contents of the DXCache and GLCache folders located in your Windows AppData directory. This process removes pre-compiled shader files that may have become corrupted, which helps resolve stuttering, graphical glitches, or crashes in games after a driver update or game patch.
What You'll Need
- A Windows PC with an NVIDIA graphics card.
- Administrative privileges to access and delete files in system folders.
- Disk Cleanup tool (built-in to Windows).
Step-by-Step
Depending on your version of Windows, labels and folder paths may differ slightly. Follow these steps to ensure a complete clear of the cache.
- Close All Games and GPU-Intensive Apps: Ensure no games, video editors, or 3D rendering software are running. If a program is using the shader cache, Windows will prevent you from deleting the files.
- Use Windows Disk Cleanup:
- Open the Start menu, type "Disk Cleanup", and select the app from the results.
- Select your primary drive (usually C:) and click OK.
- In the list of files to delete, check the box for "DirectX Shader Cache".
- Click OK and confirm the deletion. This handles the primary Windows-level shader cache.
- Manually Clear NVIDIA Cache Folders:
- Press
Windows Key + Ron your keyboard to open the Run dialog. - Type
%localappdata%and press Enter. - In the folder that opens, look for a folder named
NVIDIA. Double-click to open it. - Inside the NVIDIA folder, look for folders named
DXCacheandGLCache. - Open these folders and select all files inside (
Ctrl + A), then press Delete. - If a message appears stating a file is "in use" and cannot be deleted, click "Skip". This is normal as some background NVIDIA processes may be active.
- Press
- Restart Your Computer: Reboot your PC to ensure all cached data is fully flushed and that the system can begin generating fresh shaders upon the next game launch.
Common Mistakes
- Deleting the Folder Itself: Do not delete the
DXCacheorGLCachefolders themselves; only delete the files inside them. Deleting the folder can occasionally cause the driver to fail to recreate the directory, leading to performance issues. - Skipping the Restart: Some files remain locked in the system RAM until a reboot occurs. Without a restart, you may not actually be clearing the active cache.
- Forgetting Disk Cleanup: Many users only clear the NVIDIA folder but forget the Windows DirectX Shader Cache, which is where a significant portion of the data is stored.
Tips
- Expect Initial Stutter: After clearing your cache, you will likely experience "shader compilation stutter" the first time you launch a game. This is normal; the game is simply rebuilding the cache. Once the shaders are compiled, the stuttering will stop.
- Update Drivers First: If you are clearing the cache because of a bug, update your NVIDIA drivers to the latest version before clearing the cache to ensure the new drivers create the most stable shader files.
- Manage Cache Size: If you frequently run out of disk space, you can change the shader cache size in the NVIDIA Control Panel under Manage 3D Settings, though the default setting is usually optimal for most users.
Troubleshooting
If the steps above do not resolve your graphical issues or if you encounter errors:
- Files Won't Delete: If too many files are "in use," boot your computer into Safe Mode. In Safe Mode, non-essential drivers and background apps are disabled, allowing you to delete the cache files without interference.
- Persistent Stuttering: If stuttering continues after clearing the cache and restarting, the issue may be related to CPU bottlenecks or insufficient VRAM rather than the shader cache.
- Disk Cleanup Not Finding Files: If Disk Cleanup shows 0 bytes for the DirectX Shader Cache, it simply means the cache is already empty or the system has already purged it.
Frequently Asked Questions
Will clearing the shader cache delete my game saves?
No. Shader caches only contain compiled GPU instructions for rendering graphics. They do not store game progress, settings, or save files.
How often should I clear the NVIDIA shader cache?
Only when necessary. You should clear it if you experience sudden graphical glitches, severe stuttering after a game update, or after performing a clean installation of GPU drivers.
Does clearing the cache improve FPS?
It generally does not increase the maximum FPS. However, it can eliminate "micro-stuttering" and frame drops caused by corrupted shader files, making the game feel smoother.
Is it safe to delete everything in the NVIDIA folder?
No. Only delete the contents of DXCache and GLCache. Deleting other configuration files or driver components in the NVIDIA directory can lead to software instability.
Why does my game stutter more after I clear the cache?
This is temporary. The game must re-compile shaders for every effect and environment you encounter. Once the game has cached these again, performance will return to normal.