You might remember the early days of emulation where shader caches were simple binary dumps. For the Switch, however, the situation is vastly more complex.
The Switch allows developers to write shaders that are incredibly specific to the hardware. Furthermore, Yuzu uses a technique called Guest Shader Decompilation. Instead of simply translating the machine code directly, Yuzu decompiles the Switch shader into a high-level representation (GLSL or SPIR-V) and then recompiles it for your specific driver.
This creates a unique challenge: Invalidation.
If a game updates, or if the developers change how Yuzu handles shader logic in a new emulator update, the old cached files become invalid. If the cache isn't handled correctly, you end up with graphical glitches—missing textures, weird colors, or crashes.
Yuzu’s engineering team built a robust system to handle this. The cache is split into two main components: yuzu shader cache work
If a game crashes at the same spot every time:
A shader cache stores compiled GPU shaders that a game needs during runtime. Emulators like Yuzu translate Nintendo Switch GPU commands into shaders for your PC’s graphics API (Vulkan or OpenGL/DirectX via translation). Compiling shaders on the fly causes stuttering; a shader cache saves those compiled results so subsequent runs can reuse them and eliminate hiccups.
Build your own cache manually. It takes 2-3 hours of gameplay to complete 90% of a game's shaders. Here is the professional workflow:
After ~3 hours of play, the game will be 99% stutter-free permanently. You might remember the early days of emulation
Title: Why your game stutters and how the Shader Cache fixes it
If you’re playing a game on Yuzu and it keeps freezing every time you enter a new area or look at a specific effect, that’s the "Shader Compilation Stutter."
The Yuzu shader cache works like a save state for your graphics card. The first time you run the game, your PC has to figure out how to draw everything from scratch—that’s the hard work causing the lag. But, Yuzu saves that work into a file. Once that file is built (the cache), your PC remembers it. The next time you play, Yuzu loads that file instead of doing the math all over again, making the game run buttery smooth.
| OS | Path (Yuzu Mainline / EA) |
| :--- | :--- |
| Windows | %APPDATA%\yuzu\nand\user\shader\ |
| Linux | ~/.local/share/yuzu/nand/user/shader/ |
| macOS | ~/Library/Application Support/yuzu/nand/user/shader/ | After ~3 hours of play, the game will
Inside shader/, you’ll see subfolders:
Identifying which file belongs to which game:
Sometimes, your graphics card driver (NVIDIA/AMD) also caches shaders. If you update your GPU drivers, the driver may invalidate its own cache, forcing Yuzu to re-translate everything even if Yuzu’s cache exists. Fix: After a driver update, expect a temporary performance drop as the cache rebuilds.