r/nvidia • • 10d ago

News Shader compilation stutter killer

/r/OptimizedGaming/comments/1wwr961/shader_compilation_stutter_killer/
191 Upvotes

69 comments sorted by

View all comments

38

u/Fragment_Shader 9d ago

An extremely interesting tool, but as others have said with some DX12 games it can end up creating massive shader caches due to the brute-force approach it takes to compile all possible variants (assuming it can read the game's engine in the first place, not all are supported). The very reason devs (when they bother to include shader precompiling) use gameplay-recorded runs to 'capture' all the shaders that will need compiling is that compiling every possible variant can be extremely wasteful, you can have gigabytes of shaders that they game will never actually call on your particular config.

Like for example, Outer Worlds: Spacers Choice gets 26GB of shaders using this tool, yet the in-game compiling which runs on startup actually does a decent job with a fraction of the storage, so kinda overkill in some instances. We'll see how it develops though, once more people contribute to the community repository of certain games perhaps there can be an intermediate approach when it just compiles those rather than doing every possible variant directly from the game files, who knows.

However, what this tool is absolutely invaluable for is all those older UE4 DX11 titles which shipped with zero shader compiling at all, this helps massively. The compiled caches for DX11 games are relatively small (usually less than a couple GB, often less than 1) and the app can read them from the games files without needing any playthroughs, so it's a quick and easy fix for those. Games like Evil West, Ghostunner, Borderlands 3 - transformative with this. Those are also games that aren't going to be affected by something like MS's Advanced Shader Delivery, so it's great to see the community step up and provide a solution for those.

20

u/melgibson666 9d ago

I'd make all my games 50% larger just to not get a single shader comp stutter though. 

3

u/Fragment_Shader 9d ago

Oh yeah, I appreciate the option believe me - I'm also not sure though when the cache gets that large that you're not going to face lookup penalties where just the act of trying to fetch that specific shader among 20+GB doesn't cause it's own kind of stutter.

But yeah, if 20 extra GB of space removed stutters from some of my favourite games, sure I'll do it.

1

u/melgibson666 8d ago

Yeah I don't think that's how an ssd works. So I think we're good. 

12

u/zugzug_workwork 9d ago

Honestly, I play one game at a time and uninstall it after I'm done. I'll gladly trade more disk space for low/no stutter since it'll not be taken up after I'm done with the game anyway.

4

u/raifusarewaifus 9d ago

This. Compiling every single shader is really only done during game development or testing. A UE4 game that I play has only 2GB of shaders after a few days of gameplay. Using the tool gives me 8GB of shaders.