I only know this because I recently started doing some game development (as opposed to just being a gamer for 30 years); Shaders are little programs that run directly on your graphics card. They’re all over the place in games, doing stuff like making objects glow, morphing/transforming objects, and in 3D games, they’re also doing a lot of the work of lighting effects and details that you would want to see in order to actually see the game’s final product. When you start a game it will (either in the foreground or background) compile (build for your computer) all of the shaders designed in the game, but I guess this needs to happen on each computer. If they re-coded some of the shaders in the game to be more efficient/use fewer resources and ultimately make the game run faster, the ones in the previous release would need to be completely recompiled.
(I’m sure someone will be along to correct any inaccuracies in that.)
What I think is odd though is that game companies are throwing that around like anyone has any idea what they’re talking about though.
Most games engines should be able to calculate all the shader combinations required and pre-compile them prior to their use. I’m not familiar with Unreal (iirc Jedi Survivor does this) but it’s fairly common with other games. Alternatively there’s solutions like Fossilize from Valve and Microsoft did just announce a new D3D feature earlier today that help devs collate all the possible shader combinations too.
I remember waiting like 10 minutes with a loading window for Monster Hunter Rise to compile shaders at one point a while back and I had no idea what that meant then… (but yeah obviously most games do it more elegantly)
Thanks for the detailed explanation! That makes sense, it’s also weird to me because if it would get better in 15 minutes, then I feel like most people wouldn’t notice really? Like I’d give a game more time to test that 15 minutes, unless it was like… really bad, seconds per frame style or something.
In my experience with the real-time shader compilation bullshit, it doesn’t even out until you’ve explored most of the game unless it’s a game with very minimal aesthetic differences between areas. Each new level/area/biome will stutter like hell until it has had a chance to compile whatever the fuck it’s doing.
Technically it’s everything it’s any steam game. It’s a community resource.
It doesn’t always work, sometimes it makes things worse, some times it helps.
It’s a real crap shoot.
And if you play a lot of games it can be a LOT of storage space. For example my shader precache right now is 90gigs. Cause I play a bunch of different games so every game has to have it all saved.
Compiling at run time or during game play means those shaders only use ram for the duration of the game instead of physical storage space on top of ram during game play.
I’m fairly sure downloading/preloading shaders is a thing only for steamdeck, as the compilation result is different based on hardware & driver versions. Only “fixed” target valve has is steamdeck.
edit: actually, I might be combining two different things in my mind. Steam has downloading precompiled shaders for games for steamdeck, but has the preload/precompiling option for other systems?
‘As the shaders continue to compile’??? What does that even mean….
Ok so I looked, and I guess shaders compile, but should be better in….15 minutes of game time?
I only know this because I recently started doing some game development (as opposed to just being a gamer for 30 years); Shaders are little programs that run directly on your graphics card. They’re all over the place in games, doing stuff like making objects glow, morphing/transforming objects, and in 3D games, they’re also doing a lot of the work of lighting effects and details that you would want to see in order to actually see the game’s final product. When you start a game it will (either in the foreground or background) compile (build for your computer) all of the shaders designed in the game, but I guess this needs to happen on each computer. If they re-coded some of the shaders in the game to be more efficient/use fewer resources and ultimately make the game run faster, the ones in the previous release would need to be completely recompiled.
(I’m sure someone will be along to correct any inaccuracies in that.)
What I think is odd though is that game companies are throwing that around like anyone has any idea what they’re talking about though.
Most games engines should be able to calculate all the shader combinations required and pre-compile them prior to their use. I’m not familiar with Unreal (iirc Jedi Survivor does this) but it’s fairly common with other games. Alternatively there’s solutions like Fossilize from Valve and Microsoft did just announce a new D3D feature earlier today that help devs collate all the possible shader combinations too.
this does happen in borderlands 4, but unreal is notoriously bad at tracking which shaders you’ll need in actual gameplay.
It doesn’t help that shaders have become bloated to the point that if you prefer compile them it ends up taking 10-30 mins to load a game.
Look at monster hunter rise my computer can load all the shaders in about 8 mins. My brothers takes half an hour.
Every time you turn the game on. Cause for ever reason it just forgets the shaders and doesn’t save them.
I remember waiting like 10 minutes with a loading window for Monster Hunter Rise to compile shaders at one point a while back and I had no idea what that meant then… (but yeah obviously most games do it more elegantly)
Yeah your can either preload it or compile as you go. Both have advantages and disadvantages
Thanks for the detailed explanation! That makes sense, it’s also weird to me because if it would get better in 15 minutes, then I feel like most people wouldn’t notice really? Like I’d give a game more time to test that 15 minutes, unless it was like… really bad, seconds per frame style or something.
In my experience with the real-time shader compilation bullshit, it doesn’t even out until you’ve explored most of the game unless it’s a game with very minimal aesthetic differences between areas. Each new level/area/biome will stutter like hell until it has had a chance to compile whatever the fuck it’s doing.
You can preload the shaders in steam. It’s in the settings menu somewhere.
For anything that does this, or just Borderlands 4?
Better games just pre-compile them so you don’t even have to wait for anything.
Technically it’s everything it’s any steam game. It’s a community resource.
It doesn’t always work, sometimes it makes things worse, some times it helps.
It’s a real crap shoot.
And if you play a lot of games it can be a LOT of storage space. For example my shader precache right now is 90gigs. Cause I play a bunch of different games so every game has to have it all saved.
Compiling at run time or during game play means those shaders only use ram for the duration of the game instead of physical storage space on top of ram during game play.
You can preload any games shaders in steam, as far as I know. Mainly it helps with loading times.
I’m fairly sure downloading/preloading shaders is a thing only for steamdeck, as the compilation result is different based on hardware & driver versions. Only “fixed” target valve has is steamdeck.
edit: actually, I might be combining two different things in my mind. Steam has downloading precompiled shaders for games for steamdeck, but has the preload/precompiling option for other systems?
Linux has that for vulkan shaders but like, you still get compiling shaders when loading in bl4 even after that.
I don’t recall satisfactory having that issue and it’s ue5 afaik, hits a solid fps too even with global illumination on.
That’s possible it’s only for the deck. I didn’t consider that.
It’s all systems but only for vulkan. So outside of Linux it’s not used much since most windows games are direct X not Vulkan.
And even then some games use both so while you have the Vulkan shaders you still may need to compile direct X shaders.