This topic has been locked
TargetOne Apr 10, 2022 @ 5:49am
Shader pre-cacheing
Hi,

I know that Steam downloads pre-compiled shaders for DirectX games (the "shader cache") in order to speed up loading times when we launch the games. I have no quarrel with this, as I don't have data caps or bandwidth or storage limits to deal with.

But why do the pre-compiled shaders update so frequently? I see some games getting updates almost on a daily basis, even some games that haven't received any actual code patches from their devs in years.

How does Steam determine when to update shaders? Are they just trying to account for third-party changes in GPU hardware and drivers, as well as actual game updates? Or is there more to it than that?
< >
Showing 1-6 of 6 comments
Tharon Apr 10, 2022 @ 6:57am 
Shader pre-cache is one of the most puzzling thing on Steam. No one know exactly how they works, and there is no documentation about them.

Theorically it should share compiled cache with users with your same videocard, so when a new cached info is created by any user this is backed and downloaded to other users.

This theorically, but as i've said no one exactly work how the shader pre-caching really works.

Imho is better to turn it down, forget about it and let your system build its cache when playing. Steam shader pre-caching doesn't seem to really give any benefit (at least, i wasn't able to have any benefit for having it enabled), it clutter the download section and only work if you use Vukan or OpenGL games.
Bob the Boomer Apr 10, 2022 @ 7:37pm 
It can and does cause some games not to load and or behave badly, as does enabling shader cache size under nvidia control panel.

Confused as to why Valve have it enabled by default, as does Nvidia from memory
Teun2408 Nov 22, 2022 @ 12:05am 
Originally posted by ✎︎ John Wicks pencil ✐:
I recently just turned this off, and the game's that had light stutters, and some heavy are gone. I can't believe it was steam pre-shader cache was the root cause of it. Plus, wouldn't it be better to let nvidia handle the cache anyways?
The reason why steam cache could be beneficial is that you don't have to compile them locally. Compiling the locally while running the game can potentially lead to stutters on the first run of the game / scene.
Tharon Nov 22, 2022 @ 12:13am 
Originally posted by Teun2408:
The reason why steam cache could be beneficial is that you don't have to compile them locally. Compiling the locally while running the game can potentially lead to stutters on the first run of the game / scene.

That's done and handled by the GPU. Steam precache will only download already compiled shaders from Steam servers based on users GPU. In theory at least.
Last edited by Tharon; Nov 22, 2022 @ 1:53am
hexaae Apr 18, 2024 @ 1:15pm 
2024. Still not recommended to enbale that Steam feature, or some games and external emulators uing VK will have to re-generate their shader cache in-game on next launch every time. Disable this option and pre-compiled shaders will work as intended (generated just once) on NVidia systems.
Last edited by hexaae; Apr 18, 2024 @ 1:18pm
John Apr 18, 2024 @ 2:19pm 
This thread was quite old before the recent post, so we're locking it to prevent confusion.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Apr 10, 2022 @ 5:49am
Posts: 4