The Witcher 3 Shader Compilation Stutters

+
Please, change the way the game compile shaders and make it so it can precompile before we get to play the game rather than compiling shaders at the moment something needs to be rendered by the GPU. Make it to compile while we're in the main menu or through the first loading screen like other games do. Some, if not most of the stutterings in this game are due to shaders being compiled while we're playing and this is happening in both DirectX 12 and DirectX 11 for many people. I can play through a section and get lots of stutters, but there is 0 stutters if I go back and repeat the same section until I clear the shader cache folder or update the video card driver because using different GPU driver version invalidates shaders compiled and cached previously, being necessary to recompile again. Not all people have noticed this or know about shader compilation process, but there are already some discussions and mentions about TW3 shader compilation stutters on Steam forums as the one below:


Many games are being released on PC nowadays with this same issue, most notably those developed in Unreal Engine 4 & DirectX 12 as The Callisto Protocol. The Witcher 3 is not a game made in Unreal Engine 4, it's a game made in a in-house engine, so I guess you guys shouldn't have much trouble solving that. Another game that was released with the same issue on PC was Sackboy: A Big Adventure, but after many complaints the developers updated the game by changing the way shaders are compiled which fixed the stutters that the game had.

Please, don't let this amazing game suffer from shader compilation stutterings while it can be fixed the same way as many others did.
 
Last edited:
Where are the shaders located after they have been compiled? Could they be copied over from a version of the game before the update?
 
Last edited:
If you have a graphics card from NVIDIA, the compiled shaders should be stored as cache on C:\Users\[USERNAME]\AppData\Local\NVIDIA

It's possible, but very troublesome since shaders are compiled specifically for each GPU model and driver version. That's why the massive stutterings come back everytime we update our graphics card driver, shaders compiled and stored as cache gets "invalidated" so they have to be recompiled and it causes lots of stutters. It happens aswell at every new game update, since the shader cache is created only with that specific game version in mind, so new game version = recompile shaders again.

Devs shouldn't been using this method of compilation since it brings a lot of performance issues to their products.
 
Last edited:
On Nvidia cards since March you can also increase the size of the Shader Cache from the default 256 MB to a larger size. I have mine set to 1 GB and that seems to help in a lot of games

Nvidia Shader Cache.jpg
 
Mine is set to unlimited. Changing the size doesn't matter, it just tell the video card software to clean/rewrite the shaders already compiled and stored due to size restrictions. What matter is that the engine is programed to compile shaders at the exact moment that the GPU needs to render an effect or scene, then the game get micro freezes aka stutters because the GPU doesn't know what or how to render stuff until the compiling for that particularly stuff is finished. This would be fixed if they change the way that the compilation works for like, a one time compilation on main menu or during the first loading screen. Horizon Zero Dawn does exactly this, and it's better to spend some time compiling all shaders once than playing a game full of hitches/stutters for about 10-15 minutes everytime the graphics card driver is updated or the game itself.
 
Last edited:
Same here:
Ryzen 5 5600
16GB DDR4-3600 CL16
RX 6600 XT 8GB
Win11 pro

Playing 1080p Ultra+ no RT (because AMD GPUs suck at it). Same on both DX11 mode and DX12 mode. Lowering settings doesn't eliminate sutters.

Running any route for the first time is met with tiny but obnoxious stutters. Running the same route again - frame time graph is dead flat with not even a single stutter. This will only happen if shader compilation is a culprit. Once it's compiled - for set of assets present in given location - it's fine.


Last time I played Witcher 3 was like 2years ago ar so and beck then I was on R5 2600 + RX 470 4GB and had better experience then than now with basically 2x faster PC, because there was no such stutters.

I mean Cyberpunk 2077 runs better and smoother at max settings (no RT) - which says something about current state of Witcher 3.

Attaching DXdiag for full system info.
 

Attachments

  • DxDiag.txt
    83.6 KB · Views: 45
Yes, this issue is maddening. In order to play the game using DX12, without stutters and shit frame rate, I have to load a save and pause - then wait for around 30 minutes.

After that it’s great… excluding the occasional random crash (pretty rare for me) but I have to leave the game up all day otherwise it’s rinse and repeat.
 
Top Bottom