Often when I launch a game through Steam that “processing Vulkan shaders” window appears and loads for a couple minutes. Sometimes it takes no time, sometimes it takes several minutes. But then, for larger games like Dune Awakening or Outer Worlds 2, the game needs to sit and process shaders for another couple minutes anyway. But for some games, like Enshrouded, I can skip the Vulkan processing with no problems in the game (I do that because the Vulkan processing doesn’t go anywhere). So what is that Vulkan processing for?

  • mhz (ex lemm.ee)@lemmy.ml
    link
    fedilink
    English
    arrow-up
    7
    ·
    25 days ago

    It is the first thing I disable after a new Steam installation, I have been dpoig that for years and i don’t see much difference, ay least in the titles i play and the hardware I have (R5 5600X now 7600X with RX6800 and 16 now 32GB RAM)

  • CaptDust@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    edit-2
    25 days ago

    Shaders have to be processed when the video drivers are updated, and time to process will depend from game to game, how many shaders there are. After they are processed, shaders can be cached and recalled without a performance hit. But the cache will be invalidated after a driver update.

    If you skip preprocessing, you may see a hitch the first time a shader is used in a game scene. Like if you pick up a gun that shoots blue flames, and the game hasn’t used the blue flames before - it has to process that immediately before displaying the blue flames - which takes a split second.

    This realtime impact can be small or large, depending how many shaders load into a scene simultaneously. Loading a new map with lots of unique textures and unprocessed shaders is generally when you’ll see the big hitches as it scrambles to compile them.

    • skulblaka@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      7
      ·
      25 days ago

      Any idea why this happens constantly without driver updates?

      I ended up turning off shader-preprocessing because some games would sit and cook shaders for 10 minutes every time I boot them up, update or no.

      • CaptDust@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        25 days ago

        I dont know the specific answer unfortunately, I suspect there is another layer to the caching story with Proton/Wine Prefixes/DXVK in Linux. If the translation layer gets an update independent of the graphics driver, that could maybe also cause a cache invalidation to occur. I notice that behavior more often when I’m using Proton Experimental.

        • skulblaka@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          5
          ·
          25 days ago

          Huh, that could be exactly it, actually. Experimental is usually my default Proton fork that I try first. Makes sense that it would catch frequent updates and then invalidate the cache. I’ll try this again with GE-Proton and report back later if I remember to.

  • ZkhqrD5o@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    25 days ago

    Well, you can play the game without it, as others have stated, you should really leave it on. First of all, all of that work needs to happen then later when you’re playing the game, which is just going to lead to a subpar experience with random framerate drops that cannot be explained. From Software’s Elden Ring had a problem at launch with that. Every time a new effect or literally anything in the game was done, you’d wait for half a second and that would sometimes make your game into a slideshow for seemingly no reason. Or the Nier replicant remake wouldn’t play the pre-rendered cutscenes if you didn’t enable it. Most games don’t care, however. But for the sake of stability, my recommendation is to leave it on. It only takes a long time when you boot something up the first time, and with modern games being unoptimised as well, do yourself a favour and leave it on.

  • AirBreather@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    25 days ago

    If shaders don’t get preprocessed, then a lot of the same work has to happen later, it just shows up as a seemingly random frame that takes particularly long to render.

    (edit to add:) or a section where some of the rendering doesn’t look quite right initially, if they do asynchronous rendering.

    In the limit, the sum of all these delays can add up to the same amount of time that the preprocessing WOULD have taken, but you also don’t necessarily use every shader every time you play every game, so YMMV.

  • chunkystyles@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    4
    ·
    24 days ago

    There is a better way. Instead of compiling when you launch the game, you can enable background processing of shaders. This will happen while you’re not gaming. If you don’t do other stuff on that computer while you’re not gaming and it is turned off or asleep instead, it might not help.

  • NutWrench@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    25 days ago

    The only times my shaders get recompiled is after a Steam game updates or I get a Linux firmware update. I usually run Steam on a second desktop after I boot and am planning to play games later.

    I also have the System Info widget, running in the Taskbar on my main desktop, set to show CPU usage. When the CPU usage drops to near zero, I know at a glance when the shaders are done compiling. (It usually doesn’t take more than 5-6 minutes).