Shader Cache Cleaner v0.2
This script helps clean up the shader caches for your NVIDIA, AMD, and Intel graphics cards. It also allows users to add custom shader cache paths for cleanup.
Shader caches store precompiled shaders to improve game performance, but occasionally, they can cause issues and may need to be deleted.
Administrative Privileges:
The script checks if it is running with administrative rights and prompts for elevation if not.
Cache Location Definitions:
It defines specific directories for NVIDIA, AMD, and Intel shader caches that are commonly found in the user’s AppData directory.
User Interaction:
Users are welcomed with a message and given the option to proceed with cleaning the caches or to cancel the operation.The script confirms with the user before proceeding with the deletion of cache files.
Custom Path Option:
Users can specify a custom path for shader cache directories they wish to clean. This is useful for game-specific cache files not covered by the predefined paths. Users are welcome to post game specific shader cache files and paths in the comments!
Shader Cache Deletion:
The script attempts to delete the contents of the defined shader cache directories. If successful, it informs the user; if not, it provides feedback about any issues encountered (e.g., files in use).
The script will attempt to delete shader caches from the following locations:
NVIDIA: DXCache, GLCache, and NV_Cache.
AMD: DxCache and GLCache.
Intel: ShaderCache and Low ShaderCache.
Game Shaders if custom paths or files were added
Logging:
All actions taken by the script, including deletions and errors, are logged into a log file located in the user’s AppData directory. This allows users to review what actions were performed and to troubleshoot any issues.
User Feedback:
Throughout the process, the script provides feedback in the console and records important messages in the log file, making it user-friendly.
Error Handling:
The script checks for the existence of directories before attempting to delete them and informs the user if any specified paths are not found.
Guidance for NVIDIA/AMD Users:
If shader issues persist, the script provides advice on how to reset or disable the shader cache in the NVIDIA or AMD control panels.
NVIDIA: Manage 3D Settings – Shader Cache Size
AMD: Graphics – Advanced – Reset Shader Cache
Intel: Unknown
DISCLAIMER:
– BE AWARE THAT THIS WILL COMPLETELY REMOVE ALL SHADER CACHE FILES ONCE, AND WILL PROBABLY AFFECT OTHER GAMES TOO!
– MOST IMPORTANTLY: THIS IS NOT A FIX FOR SHADER COMPILATION/TRAVERSAL STUTTER AND IN MOST CASES IT MIGHT NOT HELP AT ALL!