Why Games Have Stutters | Shader Compilation

  Рет қаралды 12,687

My Computer

My Computer

Күн бұрын

Stutters. Long loading screens. We are used to blaming game developers for this, but they are not always to blame.
Shader compilation is the scourge of modern games. But what is it? How did it happen that a convenient piece of tech became an issue?
00:00 - Introduction
01:00 - What is a shader?
02:55 - Compilation of shaders
06:04 - Solving the stutter problem
08:43 - Results

Пікірлер: 89
@loganwolfram4216
@loganwolfram4216 Жыл бұрын
Didn't realize this was such a huge advantage of consoles. Hardware is uniform, so of course you can pre-compile the shaders.
@GemayelDaniel
@GemayelDaniel Жыл бұрын
the biggest example of this way elden ring on launch. the performance was not bad, but it had constant stutter on pc, while on consoles there was none
@moonknightish
@moonknightish 8 ай бұрын
They could offer to download pre compiled shaders based on your hardware of choice. But that would require actually caring about the PC gaming market
@GuyManley
@GuyManley 8 ай бұрын
@@moonknightish This is exactly what Valve does for their Steam Deck. It's not really feasable for a game devoloper to do this for every GPU that their game might run on.
@pcgamingftw5694
@pcgamingftw5694 8 ай бұрын
Agreed, but what is feasible and manditory is a comprehensive pre-compilation step offered by the game. I'm sick and tired of all my favorite games stuttering and this goes way back before dx12 which many people blame it on. Games like Ryse, Crysis 1 from 2007, Half-Life 2, Assassin's Creed 2, Mirror's Edge 1 and Catalyst, both Jedi games by Respawn, Witcher 3 and Metal Gear Solid 5 to name a few. You have everything from dx9, 10, 11 and 12 here which all exhibit minor to severe shader stutter both on my Radeon 6800 and my old GTX 1660 Super (though it's a tiny bit less noticable on it). Ihave done extensive testing and confirmed the difference between the traversal stutter some games have and shader stutter. Either somebody comes up with a solution for a shader standard that doesn't require compilation or you offer a pre-compilation step, anything else is unacceptable in the age of Digital Foundry and frametime graphs...@@GuyManley
@gameskyjumper1721
@gameskyjumper1721 7 ай бұрын
On Switch I can put in the game Monster Hunter Rise. I press A to skip. bam. BAM. I am in the game. On pc, I need to wait for shader to compile every damn time. PC really is regression some time.
@chunkylover5367
@chunkylover5367 Жыл бұрын
Please just give us the option to wait 20 mins or so to compile shaders. I'd gladly wait.
@nutifafa_foli
@nutifafa_foli 10 ай бұрын
My sentiment exactly. Just give players the choice.
@SunderMount
@SunderMount 7 ай бұрын
I'd be willing to wait for 2 hours if it means no stuttering in gameplay.
@jonathaningram8157
@jonathaningram8157 2 ай бұрын
Horgwart Legacy has shaders compilation at start but it still stutters like crazy ingame.
@pedro.alcatra
@pedro.alcatra 6 ай бұрын
You guys may not agree. But I would wait for the full shadder pre compilation if it was a garanty for no sttutters in gameplay
@John117M63
@John117M63 Жыл бұрын
I would be cool waiting an hour for shaders to compile.
@hazelcrisp
@hazelcrisp Жыл бұрын
I know that Uncharted 4 and TLOU1 do shader compilation at the start.
@hazelcrisp
@hazelcrisp Жыл бұрын
I guess some people are just impatient
@nutifafa_foli
@nutifafa_foli 10 ай бұрын
Yeah, mentally accommodate that as an extended download and allow it do it's thing, for your eventual benefit.
@pcgamingftw5694
@pcgamingftw5694 8 ай бұрын
I agree, but with how complex shaders and game rendering in general is getting, for long term this might not be feasible. I think UE5 has multiple aids in development of which some are available now and they do a decent, though not comprehensive job of addressing the issue without a 1 hour pre-compilation. Let's hope they'll be successful in the future. I'd just prefer my drivers to be up to date, esp considering I'm using AMD which has buggy drivers and pumps out new ones every 2-4 weeks usually. I cannot deal with doing 1 hour for every game I own every 2-4 weeks, that seems mad. Although I'd prefer it over the stutter that most of my games, even older dx9, 10 and 11 ones exhibit...
@jonathaningram8157
@jonathaningram8157 2 ай бұрын
Stutters is what makes me want to go back to console gaming. I have a beefy computer, 7800X3D with a RTX4090 but even with that, PC games are basically hit and miss. Some will work perfectly fine, for other, not at all. I had a lot of problems with Unreal Engine games (Lies of P, Hogwart even Sifu). And it's especially bad because I play at 120 fps, so I notice even the smallest stutter and it can ruin an otherwise extremely smooth experience. But I learnt that not everybody care about those or even notices it.
@taylor85345
@taylor85345 2 ай бұрын
It would have been good to mention Valve's shader pre-compilation system for Steam Deck / Linux, where Shaders are pre-compiled by Steam in the background while your system is idle. Valve also basically crowdsources compiled shaders from their users, then distributes them to other users with similar hardware configurations.
@andrescampos5435
@andrescampos5435 8 ай бұрын
Awesome video! I currently have a Ryzen 5 3600 paired with an RX 6700XT, so what I understood, switching to a CPU with better single core performance will improve stuttering issues? Stuttering in the latest releases is making me quit gaming on PC
@juno1597
@juno1597 Жыл бұрын
Excellent video, very informative. I'm curious, are you videos dubbed?
@Sybertek
@Sybertek Жыл бұрын
The videos on this channel are dubbed. This isn't his main channel. It's an English-friendly channel which seems to derive from Мой Компьютер. I believe he's Russian since that's the language used on his main channel.
@juno1597
@juno1597 Жыл бұрын
@@Sybertek ahh okay thanks!
@robertmyers6488
@robertmyers6488 Жыл бұрын
Very informative. Thank you.
@GemayelDaniel
@GemayelDaniel Жыл бұрын
this is incredibly informative. thank you
@OCPyrit
@OCPyrit 17 күн бұрын
Just compile shaders on the fly and when the engine wants to draw an object whose shader is not yet ready, use a basic standard shader for the object until the high quality shader is done compiling.
@robertmyers6488
@robertmyers6488 Жыл бұрын
I wasn't aware of the cpu being needed for shader compiling. Is that independent of running game play? Most games don't take advantage of modern multithreaded cpus above 6 to 8 cores. Would moving to 12 and 16 core cpus help and if so why isn't it being done? Is there a way to by pass the cpu? Could the GPU be used in some way to do the compiling? Every move outside of the GPU results in a latency penalty.
@juno1597
@juno1597 Жыл бұрын
He said the GPU can communicate directly with a NVME SSD, but currently the software is immature. He also said developers currently are overloading the primary game thread this causing frame hitches, and that developers are not accustom to multi thread shader compiling, so having more threads wouldn't cause a benefit.
@sneakycactus8815
@sneakycactus8815 Жыл бұрын
@@juno1597 seems like incompetence at this point, especially given other glaring issues in the gaming industry. but i could be wrong. why havent devs gotten used to optimizing for multi core, multi thread, cpus in 2023? we've had quad core cpus since 2006, and multithreading on a mass scale since 2017 or so. that was 6 whole years ago
@juno1597
@juno1597 Жыл бұрын
@@sneakycactus8815 I don't know, this video mentions that part of the problem is because the consoles solved this problem many generations ago because they never had good CPUs up until now.
@juno1597
@juno1597 Жыл бұрын
@@sneakycactus8815 If I had to give you my educated guess, while Nvidia has pushed a lot of cool graphical technologies, they nor Microsoft has pushed for direct storage on PCs because PCS has had fast single core CPUs for a long time. The truth is, it's only up until now with the amount of shaders that are present that this has become a serious problem.
@gpsoftsk1
@gpsoftsk1 Жыл бұрын
@@sneakycactus8815 Most developers are not able to develop good multithreaded code. Generally, I think most companies will try to avoid multithreaded code as much as possible. Especially bugs are expensive to solve there. Also, there are not enough developers for this and the best are rather working in corporations where they are working on business problems. These pay more than gaming companies, even most non-gaming C++ jobs are not well paid (except finance, trading and similar fintech-related niches).
@InternationalLiaison
@InternationalLiaison Жыл бұрын
windows page filing/memory virtualization corrects most stuttering for 4 core 8 thread processors and higher core threads. optimizing the system in system ram instead of having an ssd/HD over work on the write cycle.
@DavidJonSpem
@DavidJonSpem Жыл бұрын
Meanwhile ISLC does a better job in managing memory than Windows itself. Why is this a separate program we can install to make Windows run better? I don't know.
@jpbianchini
@jpbianchini 7 ай бұрын
I'm a bit confused with 5:40 Don't consoles have any 'equivalent' of driver updates, say with system software updates? Does none of that ever break the precompiled shaders?
@TheMaztercom
@TheMaztercom 2 күн бұрын
Nope, they dont update their gpu drivers, they dont need it.
@jonathaningram8157
@jonathaningram8157 2 ай бұрын
I noticed steam has a shader cache option but it's only for vulkan game it seems. they already use that for the deck.
@alphaomega1969
@alphaomega1969 8 ай бұрын
The problem is games are not optimed to use pagefile correctly
@wain___614
@wain___614 Ай бұрын
So therefore the larger the game size,the more graphics it contains,and thus the more shaders that would have to be compilated for that game to be played???
@pcgamingftw5694
@pcgamingftw5694 Жыл бұрын
I wonder if it isn't possible to develop a sort of industry standard for shaders. Sure, it is nice to have great perfomance, but it is not worth it if the game stutters. I would rather have a game run at a stable 60 fps than 120 with 300 ms stutters...
@alphaomega1969
@alphaomega1969 8 ай бұрын
It does exist for AMD called Surface Format in gpu setting, this is AMD optimised shader.
@pcgamingftw5694
@pcgamingftw5694 8 ай бұрын
I don't think you understand what I was trying to say. I meant a standard for shaders that would get rid of the need to compile them. Also, I'm not sure if this setting even relates to shaders, as the description says it has to do with texture formats which is a different thing. Even if it does relate to shaders it doesn't seem to be doing a great job as it is always enabled by default and games like Rsye, Crysis 1 from 2007, Half-Life 2, Assassins's Creed 2, Mirror's Edge 1 and Catalyst, both Jedi games by Respawn, Witcher 3 and Metal Gear Solid 5 all have minor to severe shader stutter, ranging between 30 to 300 ms and higher on my 3700x with a 6800. And I tried it with my old GTX 1660 Super as well, which had the same shader stutter in the same spots, just a bit less noticable, as Nvidia's driver is probably using some of its CPU overhead for that and is a bit better optimised. This is why I'd prefer a global standard...@@alphaomega1969
@Longlius
@Longlius 7 ай бұрын
We have an industry standard for shaders - they're called shaders. The idea is that you write your shaders in a higher-level shading language and your graphics drivers compile them for your specific hardware. The actual microarchitecture of graphics cards can differ wildly even one generation to the next which is why having good drivers is so important.
@pcgamingftw5694
@pcgamingftw5694 7 ай бұрын
@@Longlius I don't understand your comment. I meant a standard that gets rid of the need to compile them, while still being efficient. Of course shaders are the standard, but it's clearly not an optimal one if developers do not have the time, resources or knowledge to provide pc versions without shader stutter, then we have to create a standard that circumvents these issues. Yes, you can say it is the dev's fault and I fully agree! However, knowing this will not provide us with better ports. Not buying bad ports won't either, because the higher ups will just argue that the pc market is dying again and not give us as many pc ports, just like they did during the ps3/360 era. As for your comment about the need for good drivers, well, both nvidia and amd have similar amounts of shader stutter, with nvidia only being slightly less intrusive, but still unplayable. Doesn't seem like they can fix that. So yeah, I don't see this changing anytime soon. Hence why I was thinking about a new standard, a complete rework of the way it works, because shaders are only getting more and more complex and our cpu's performance isn't improving to the point of getting rid of 300-500 ms stutters in the near future, be it on nvidia or amd drivers. I'm not an engineer but I know it has to do with optimisation for the different microarchitectures and creating a universal standard is impossible with the way things are currently handled. It was just wishful thinking I guess...
@drain7632
@drain7632 6 ай бұрын
@@pcgamingftw5694 That's sort of how GPUs used to work when they had fixed-function pipelines instead of shader based ones, where the functionality of GPUs was fixed and not customizable, but also didn't need any compilation. Shaders were introduced to make GPUs more flexible but they introduced the whole notion of having to compile them beforehand.
@dandoran1313
@dandoran1313 4 ай бұрын
There is a big advantage of using uniform hardware and tapping in to the depths of the system.
@SuperPotato316
@SuperPotato316 3 ай бұрын
One of the biggest reasons why i prefer to buy my games on PS5. Sure, graphics are worse and i can't reach FPS like on PC, but i don't have to deal with shit like this.
@arianshahrokh1439
@arianshahrokh1439 Жыл бұрын
Great vid!!
@bravofoxtrott4390
@bravofoxtrott4390 2 ай бұрын
I miss the Times, when pushing a Button and was in the game.
@MerchAlts
@MerchAlts 11 ай бұрын
There are some games that compile the shader before launching to play that should be a standard in all games.
@BaghaShams
@BaghaShams 4 ай бұрын
Did you watch the video? He talks about the pros and cons of that approach several times, and there are serious cons.
@izayoiigames3467
@izayoiigames3467 2 ай бұрын
cmon, its ok to wait 1 hours for shader compilation than having stuttering in game :(
@mridiot8430
@mridiot8430 Жыл бұрын
Such a good video
@abcdoooabcd
@abcdoooabcd 6 ай бұрын
i use pre shaders caheing on my steam deck but they are too frequent for my liking
@PHOBIAx57x
@PHOBIAx57x 11 ай бұрын
I’d rather just wait. Hopefully there will be a way to brute force in the future so we can play games that never got fixed like Jedi Fallen Order
@yentis
@yentis Ай бұрын
Look into dxvk and its async variants dxvk-async & dxvk-gplasync
@PuppetTheClown
@PuppetTheClown 9 ай бұрын
what game is at 6:25
@antongrekov7710
@antongrekov7710 8 ай бұрын
Forspoken
@PuppetTheClown
@PuppetTheClown 9 ай бұрын
What is the game at 1:53?
@antongrekov7710
@antongrekov7710 8 ай бұрын
atomic heart
@knipsi22
@knipsi22 5 ай бұрын
On Linux you can enable background shader precompilation and shader caching in Steam. Games will start instantly and not stutter
@hotelwalenca2557
@hotelwalenca2557 5 ай бұрын
Maybe i change to linux , i want this
@SerdceDanko
@SerdceDanko 4 ай бұрын
Yeah, but non-steam games will stutter as usual, so Linux users are enslaved by Steam.
@NabiYote
@NabiYote 3 ай бұрын
@@SerdceDanko That's not really a concern anymore with the introduction of graphics pipeline library, if you play let's say overwatch 2 on lutris and have a capapable gpu it compiles shaders as they are being loaded by the game, like in windows. You can test this going to the range with DXVK_HUD=full on the envars, so in steam I wouldn't recommend enabling shader pre-caching anymore, even on valve games dxvk 2.0 and up behave better and are more consistent only really stalling if they have to suddenly pull something from slow storage like mechanical drives, the only real case for distributing shaders like this is if your gpu doesn't support gpl or you are doing esoteric testing of drivers.
@JellyJman
@JellyJman Жыл бұрын
Kinda funny the first game to use direct storage is Forspoken
@arnabpaul3829
@arnabpaul3829 Жыл бұрын
CAN I COMPILE SHADERS AND STORE IN ON DRIVE AND WHEN PLAY GAME BEFORE GAMING IN JUT PUT THE COMPILED SHADERS ON RAM????????
@sorbpen
@sorbpen 17 күн бұрын
Is it only for me this video is out of sync with the audio?
@GrekkoGaming
@GrekkoGaming 8 ай бұрын
I am reassured! My steam game takes on average 60 seconds to launch the level, if you tell me that The last of Us takes 2 hours to load shaders , I’m satisfied !
@drxyd
@drxyd 7 ай бұрын
The long term solution is for hardware manufacturers to standardize their architectures, eventually market forces will push them to do so as shaders become more complex, gaming on consoles remains simple and PC grows ever more janky.
@nolimitza.j5063
@nolimitza.j5063 12 күн бұрын
this channel is seriously underated, other dumb youtubers who dont even know what causes stutter flood the top videos and the real knowledge was down on this channel
@jonathaningram8157
@jonathaningram8157 2 ай бұрын
is that a dubbed video ? Lips doesn't syncs.
@jakewolf079
@jakewolf079 6 ай бұрын
WAIT SO IT'S NOT JUST ME????
@user-wj6bl1ie1z
@user-wj6bl1ie1z 6 ай бұрын
No bro.. All of games example they made of unreal engine they all stutter and have shaders.. That make you annoying and hate the all games..
@olemangamesdesigns5497
@olemangamesdesigns5497 Жыл бұрын
The game Developers dropped the ball. Games should not leave the building in this condition. As a small Indy Game Developer for 8 years, even I Know that this situation should be resolved during development. This is why Game companies should have paid game testers who will test for bottlenecks, where the PC CPU is maxed out for long periods of time, and other bugs. At least they should have a loading screen with ambient music while game is compiling shaders. Games should be optimized before leaving the door. This is also the reason for Early release give the game away free to as many potential users as possible with rewards for submitting helpful feedback. if 1000 user try your game this mean it has been tested on at least that many different system configurations. I have seen these issues during development my first game is yet to go out the door, but it won't go out officially until these situations are resolved. it the Game must start out of the box ready to go within seconds no more than a minute. My project is over 100 gigabytes in development. I had issues with long starting time, but having a Good Programmer to attend to these issues took care of them real quick. I have a Ryzen 3, with 40 gigs of ram and 4 gig video Radeon 6500xt, 2 gigabyte Samsung NVME hard drive. I'm upgrading to Ryzen 7 - 3700x and 64 gig of ram. with 8 gigs of SATA SSD storage, and higher end Radeon 8 gig DDR6 graphic adapter Game Developer & Game Designer - OLE MAN GAME DESIGNS Creating Fun by Design - Project Imminent Dissolution - The Return of the Mother Auxesis
@JellyJman
@JellyJman Жыл бұрын
Yeah man but all that QA takes time and money lol they gotta get the game out NOW
@jamesmorris7844
@jamesmorris7844 4 ай бұрын
Okay, but where was this issue in the PS3 and PS4, era, i mean look at Arkham Knight vs gotham Knights, the older game looks better.
@johanndaart7326
@johanndaart7326 Жыл бұрын
Your voice in this vid is very quiet. It's also about the way you talk, it's not as clear as it could be, a bit too fast, some words are mumbled. I'm not hating bro, but just letting you know - I needed to turn my speakers way up to hear you properly, while before watching your vid I've watched other guys at lower volume and I could hear them no problem.
@Alex_Morozov_
@Alex_Morozov_ Жыл бұрын
Hey!
@MrNo0p
@MrNo0p Жыл бұрын
Video and Audio are not in sync. By a lot. good video otherwise
@arthurviolin
@arthurviolin Жыл бұрын
It is a dubbed version from russian.
@LongerThanAverageUsername
@LongerThanAverageUsername 8 ай бұрын
@@arthurviolinit’s so out of sync that it’s in a different language
@SerdceDanko
@SerdceDanko 4 ай бұрын
This crap is ruining PC gaming.
@BlueLightningSky
@BlueLightningSky 4 ай бұрын
Gamers can't wait for shaders to compile? If you're playing a game you have enough time and you gotta a phone. You've wasted more time in your life than waiting for shaders to compile.
Почему фризят игры на ПК | Компиляция шейдеров
12:15
Why Stairs Suck in Games... and why they don't have to
11:24
Nick Maltbie
Рет қаралды 1,5 МЛН
Hot Ball ASMR #asmr #asmrsounds #satisfying #relaxing #satisfyingvideo
00:19
Oddly Satisfying
Рет қаралды 28 МЛН
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 7 МЛН
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
kak budto
Рет қаралды 1,2 МЛН
Be kind🤝
00:22
ISSEI / いっせい
Рет қаралды 24 МЛН
Why PC Game Ports STILL Suck
7:53
Techquickie
Рет қаралды 497 М.
Why Don't Console Games Have Shader Compilation Stutter?
4:51
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 3,8 МЛН
The Art of Game Optimization
10:18
Worlds In Motion
Рет қаралды 249 М.
The Strange Graphics Of LETHAL COMPANY
15:59
Acerola
Рет қаралды 704 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 386 М.
Unreal Engine 5 First Generation Games: Brilliant Visuals & Growing Pains
23:24
How do Major Video Games Render Grass?
9:33
SimonDev
Рет қаралды 373 М.
This issue is plaguing modern gaming graphics
23:30
𝐇𝐲𝖇𝐫𝖊𝐝 ✪
Рет қаралды 566 М.
Stut…ter
5:03
RandomGaminginHD
Рет қаралды 940 М.
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 12 МЛН
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 46 М.
Mem VPN - в Apple Store
0:30
AndroHack
Рет қаралды 37 М.
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 3,4 МЛН
Где раздвижные смартфоны ?
0:49
Не шарю!
Рет қаралды 741 М.