It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
When you start a PC game, the game has to compile its shaders for the particular GPU the game is running on, and if the game uses a lot of shaders (which can easily happen with console ports such as Horizon Zero Dawn), that can take a while. (I read that apparently the game can take a half hour to start; is this true?) I suspect I may have experienced this with Alwa's Legacy, which took a while to start the first time for me, as well, and staring at a black screen is rather frustrating.

So, if a game is going to be shader heavy, there are 2 things I think such games should do:
1. On start-up, if the game has to compile its shaders, it should display a notification and a progress bar, so that the user can see that the game is doing something; this would be less frustrating than just getting a blank screen for minutes on end with no feedback, so it appears the game may have failed to start.
2. Provide a way to compile the shaders without starting the game, or equivalently to have the game start, compile its shaders, then immediately quit. Sometimes a user might not have time to play a game now, but might want to do so later, and would want the game to be ready to play by them. (It would also help to be able to do this right when the installation has finished.)

In any case, the diversity of GPUs in PCs, while nice, does have its drawbacks, and this is one of them. (This isn't an issue on consoles, where the game can just ship the compiled shaders with the game, because every console of a given type has the exact same GPU.)

Edit: Why the low rating here?
Post edited January 18, 2021 by dtgreene
You said it yourself, HZW is a poor console port, the way to solve the "shader" issue is just to make a proper port. Or play a different game. That said, I didn't find that game particularly awful, and shader compilation while a mild annoyance at times, didn't take half hour, 5 min at the most, and there's nothing that prevents the player to interrupt it and just move along.
1. The only game where I really noticed this is No Man's Sky, which from one of the early patches on displays an according message.
2. is a nice idea, but could possibly confuse non-tech-savvy gamers. I see the boards overflowing with "I compiled my shaders for the third time, and still get less than 40 fps. What a shitty game!!1".
While point #1 has some merit, it is too limited. All potentially long initialization should be accompanied by a progress indicator. Whether it is a progress bar or a spinning indicator is irrelevant, as long as it moves (and only moves) when progress is made. Running a spinner in an alternate thread is pointless, as the initializer may be hung/crashed but the spinner continues going. Similarly, progress bars which take seconds to get to 80% and then freeze for 5 minutes are not very useful, either. Providing a log or error message of some sort on failure would be nice as well, rather than hanging or crashing silently, but that's a different issue.

While your second point isn't implemented anywhere, the fact is, your video driver should be caching shader compiles. I mean, Mesa does it, so commercial drivers should do it as well. You should on.y be penalized for the compile the very first time you play the game, unless there are problems with your cache. I suspect the bulk of the time in most games' graphics initialization is spent preloading assets (mostly textures)).

The only thing I wish games with any shaders at all would do is verify their shaders actually comply with the standard (in opengl, indicated by the #version directive) they claim to comply with. I have seen several games which do/did not. In particular, Stars in Shadow was using an nVidia library which produced #version 120 shaders which used version 140 features (as if I needed more reasons to hate nVIdia). The devs kindly fixed that, as apparently only Mesa cares about compliance enough to raise an error. Similarly, Imperium Galactica 2 uses obsolete/eliminated functions in the advertised version (I had to fix that myself). I'm sure there are more. DirectX probably has a similar directive that commercial drivers are sloppy with, but wine probably isn't.
avatar
darktjm: While your second point isn't implemented anywhere, the fact is, your video driver should be caching shader compiles. I mean, Mesa does it, so commercial drivers should do it as well. You should on.y be penalized for the compile the very first time you play the game, unless there are problems with your cache. I suspect the bulk of the time in most games' graphics initialization is spent preloading assets (mostly textures)).
There's still the first run of the game, and someone might not have any time now but might have a bit of time later and want to play right away.

Also, driver updates and GPU changes also require the shaders to be re-compiled.)

(In any case, in the Alwa's Legacy case, the high start-up time definitely had to be something that was cached, as later runs of the game start up much faster, though still slower than The Alliance Alive (and that's *with* TAA being 3D and running through wine).)
avatar
darktjm: The only thing I wish games with any shaders at all would do is verify their shaders actually comply with the standard (in opengl, indicated by the #version directive) they claim to comply with. I have seen several games which do/did not. In particular, Stars in Shadow was using an nVidia library which produced #version 120 shaders which used version 140 features (as if I needed more reasons to hate nVIdia). The devs kindly fixed that, as apparently only Mesa cares about compliance enough to raise an error. Similarly, Imperium Galactica 2 uses obsolete/eliminated functions in the advertised version (I had to fix that myself). I'm sure there are more. DirectX probably has a similar directive that commercial drivers are sloppy with, but wine probably isn't.
The issue here is really the graphics drivers which are too lenient, and for developers who (perhaps without knowing) were using said more lenient drivers.

There should really be some readily available graphics drivers that are oriented towards developers rather than end users, or at least dev modes for the consumer drivers. It is OK to sacrifice some performance here for better error checking and reporting. Perhaps there should be some way, without having to insert lots of error handling code into the program, to make the game immediately halt if an error is found (the error callback has two issues: It's messy (so not so friendly for someone just learning OpenGL, who would want this feature enabled) and I've found there are some errors that don't get sent to it (I think that happened when linking shader programs or something). A lint tool would also be useful. (Does some of this exist today?)

(Note that dev machines are typically more powerful than the average player's computer, so there should be some room to give up performance to aid in debugging; they just need to compile in release mode before releasing (which, as a side note, Super Mario 64 did *not* do).)
Post edited January 14, 2021 by dtgreene
How long is too long? Since upgrading to ryzen from my old FX-8350 and going from a WD Black HDD to a WD Black NVME SSD, the only game I've played that has "long" loading times is GTA 5 (which was dire on an HDD, but isn't as bad on an SSD)

Games should use the copyright messages and developer logos to load items into memory (I remember some games that would only let you skip these once everything was loaded in); of course, the people who mod out the developer and intro logos would still suffer, but I'm not sure that concerns me!
avatar
pds41: How long is too long? Since upgrading to ryzen from my old FX-8350 and going from a WD Black HDD to a WD Black NVME SSD, the only game I've played that has "long" loading times is GTA 5 (which was dire on an HDD, but isn't as bad on an SSD)

Games should use the copyright messages and developer logos to load items into memory (I remember some games that would only let you skip these once everything was loaded in); of course, the people who mod out the developer and intro logos would still suffer, but I'm not sure that concerns me!
I would say that more than a few seconds without any feedback is too long.

Actually, from a UI perspective, even just 1 second is way too long for there to be any feedback.

(Note that this is the time before anything observable happens, not the time it takes for the game to actually load; there's a difference here.)

Incidentally, TES: Oblivion seems to be one of those games that loads during the developer logos; if you disable them (which is pretty easy IIRC) there's a loading screen in their place.

One side-effect of using a fast SSD is that, when games put tips on loading screens (something that isn't that unusual), the tip may disappear before the player has a chance to read it.
avatar
dtgreene: (Note that this is the time before anything observable happens, not the time it takes for the game to actually load; there's a difference here.)
...

Incidentally, TES: Oblivion seems to be one of those games that loads during the developer logos; if you disable them (which is pretty easy IIRC) there's a loading screen in their place.
Agree - I don't like staring at a blank screen for more than a second or so as it makes you worry that it has just crashed. I don't know if you ever came across the game Fuel (by Asobo Studios, now more famous as the creators of Flight Simulator 2020) - this had a "Loading Shaders" bar when you loaded the game up. Unfortunately, they didn't start loading the shaders while the intros were playing, which was a missed opportunity.
avatar
dtgreene: One side-effect of using a fast SSD is that, when games put tips on loading screens (something that isn't that unusual), the tip may disappear before the player has a chance to read it.
True - but I'd prefer that over slow HDD loading times. It can easily be fixed by enforcing a "Press Space to continue" at the end of a load, but I know that winds up some people as well. It's amazing how divisive everything is!
avatar
dtgreene: One side-effect of using a fast SSD is that, when games put tips on loading screens (something that isn't that unusual), the tip may disappear before the player has a chance to read it.
avatar
pds41: True - but I'd prefer that over slow HDD loading times. It can easily be fixed by enforcing a "Press Space to continue" at the end of a load, but I know that winds up some people as well. It's amazing how divisive everything is!
If the game is an action game where it's possible to lose shortly after loading with no input, then having to press something to continue makes sense. (Alternatively, one could design the game to never kill or penalize you in that situation, like Celeste does.)

The same situation applies if the game has a time limit, or is a real-time strategy game where enemies will get an advantage if you do nothing.

Suitable fixes involve having the time not start until user input is detected, or (for multiplayer) a countdown at the start of a match.
avatar
dtgreene: When you start a PC game, the game has to compile its shaders for the particular GPU the game is running on, and if the game uses a lot of shaders (which can easily happen with console ports such as Horizon Zero Dawn), that can take a while. (I read that apparently the game can take a half hour to start; is this true?)
For me it took something like 10 minutes for the HZD shader compiling to complete (on a two years old non-gaming laptop). I read that for some it takes less time (a few minutes), so I presume it depends on just how fast your CPU is (to compile).

However, the bigger problem is that the compiling takes place every time I start the game. It is not only the first run. I googled for it and it seemed that for some it does it only once, and for others (like me) it compiles every time you run the game, with the latest version of the game. No one really seemed to have an idea what determines if it runs only once or every time (I thinkit was supposed to run only once, until you update your graphics drivers).

There is a percentage showing in the main menu how far the process is, and you can start playing the game without waiting it out (first time I didn't even see that but just went on to play the game). If I read right, there are some longer pauses etc. when entering new areas, if you don't let it finish before starting the game.
Post edited January 14, 2021 by timppu
avatar
timppu: For me it took something like 10 minutes for the HZD shader compiling to complete (on a two years old non-gaming laptop). I read that for some it takes less time (a few minutes), so I presume it depends on just how fast your CPU is (to compile).

However, the bigger problem is that the compiling takes place every time I start the game. It is not only the first run. I googled for it and it seemed that for some it does it only once, and for others (like me) it compiles every time you run the game, with the latest version of the game. No one really seemed to have an idea what determines if it runs only once or every time (I thinkit was supposed to run only once, until you update your graphics drivers).

There is a percentage showing in the main menu how far the process is, and you can start playing the game without waiting it out (first time I didn't even see that but just went on to play the game). If I read right, there are some longer pauses etc. when entering new areas, if you don't let it finish before starting the game.
Interestingly enough in Horizon Zero Dawn, even though I'm one of those lucky people who don't see the optimizing shaders pop up at start up, if I leave the game at the title screen long enough (over a minute) it will start anyways.

Having said that. Since i have an older CPU, the first time the optimizing occurred it took around 30 min. Now if I let it start, it takes closer to 5-10 min.

It does make me wonder what is actually happening during the "optimizing", as it clearly saved what it did for optimizing the first time.
Post edited January 14, 2021 by Crimson_T
---
Post edited January 15, 2021 by teceem
It seems the steam client is able to download shaders that are adapted to the configuration of the computer. They warn that allowing this increases bandwith and harddisk use (logically, if the shaders are to be downloaded).

EDIT: Added image.
Attachments:
Post edited January 15, 2021 by Carradice
avatar
Crimson_T: Interestingly enough in Horizon Zero Dawn, even though I'm one of those lucky people who don't see the optimizing shaders pop up at start up, if I leave the game at the title screen long enough (over a minute) it will start anyways.

Having said that. Since i have an older CPU, the first time the optimizing occurred it took around 30 min. Now if I let it start, it takes closer to 5-10 min.

It does make me wonder what is actually happening during the "optimizing", as it clearly saved what it did for optimizing the first time.
Yeah I am unsure if it actually was (much) longer the first time, but I recall later it is like 10 minutes maybe on my laptop.

And yeah apparently it doesn't start right away, but if you wait some time in the menu.

I don't know if more information has come up since the last couple of weeks why it is happening and differently to different people. A couple of weeks ago the Steam discussions about it just seemed confused over it.
A theoretical sound machination this seems, yes yes