Cache Management
Unreal caches aggressively. That is what makes iteration bearable, but it also means a stale cache can make a correct change appear not to work — or an incorrect one appear to.
What the script clears
WipeShaderCache.bat deletes three directories relative to the engine root:
Directory | Contents |
|---|---|
| Compiled shaders, cooked textures, built meshes and every other derived artefact |
| Intermediate shader compilation output |
| Shader debug symbols and preprocessed source dumps |
It reports each directory as deleted, not found, or failed. A failure almost always means something still holds a file handle.
After wiping, the next editor launch recompiles everything it needs. On a large project this can be tens of minutes or more. Do not do it casually.
When to wipe
- You changed a .usf or .ush file and nothing happened
Shader source changes are usually picked up, but engine-level global shader changes sometimes are not. Try
recompileshaders globalorrecompileshaders changedin the console first — it is far faster than a full wipe.- You changed a compile-time switch
Changing VITE_RT_PSO_DEBLOAT,
VITE_O_SSAOor any otherVITE_*switch changes which shader permutations exist. The engine rebuild handles the C++, but cached shaders from the old configuration can linger. Wipe after switching.- You pulled engine changes that touched the renderer
A merge that changes shader code or the shader map keying can leave a cache the engine misreads.
- You are getting shader compilation errors that do not match the source
A classic stale-cache symptom: the reported error line does not exist in the file you are looking at.
- The editor crashes on startup after an engine change
Worth trying before deeper investigation, since it is cheap to rule out.
When not to wipe
Wiping the DDC is a heavy hammer and is frequently applied to problems it cannot solve.
Project-level problems. The script clears the engine DDC. Your project has its own
DerivedDataCachefolder and its ownIntermediateandSaveddirectories. Engine-level wiping does not touch them.Runtime rendering bugs. If an effect renders wrongly but consistently, that is a code or configuration problem, not a cache problem. Check the compile-time switch availability table first — many ray tracing features are compiled out by default and their console variables silently do nothing.
Long shader compile times. Wiping makes this worse, not better. See Shader Compilation and PSO.
Lighter-weight alternatives
Try these before a full wipe:
Approach | Clears | Cost |
|---|---|---|
| Modified shaders only | Seconds |
| Global shaders | Under a minute |
| One material | Seconds |
Delete the project's | Project build intermediates | Project rebuild |
Delete | Intermediate shader output, keeping the DDC | Partial recompile |
The last one is worth knowing: the DDC is the expensive part to rebuild. If you only need to clear intermediate shader state, deleting that one directory by hand is much cheaper than running the full script.
Cache locations
Cache | Path | Cleared by the script |
|---|---|---|
Engine DDC |
| Yes |
Engine intermediate shaders |
| Yes |
Shader debug info |
| Yes |
Project DDC |
| No |
Project intermediates |
| No |
Shared / network DDC | Per | No |
Local user DDC |
| No |
Disk footprint
The engine DDC grows without bound during development. On a project that exercises many material and ray-tracing permutations it can reach tens of gigabytes. Periodically wiping it is a legitimate way to reclaim disk space, accepting the recompile cost.
If disk space is the actual concern, the Debloat Guide covers larger and more permanent savings.