Title. I always skip them and don’t notice any detrimental effects at all. I used to let them run every time, but I don’t want to wait 5 minutes for every patch update bug fix anymore

  • Zarobi@aussie.zoneOP
    link
    fedilink
    English
    arrow-up
    22
    ·
    18 hours ago

    So basically, depending on the game, it’s mostly fine to skip, but sometimes it’s not, and if you have issues, try letting it compile?

    • Screen_Shatter@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 hour ago

      Thats my anecdotal experience, yes. God of War Ragnarok is nice enough to show it happening in the corner and it made it very apparent why I would get stuttering until it was mostly complete.

    • Err(()).unwrap()@lemmy.world
      link
      fedilink
      English
      arrow-up
      29
      ·
      edit-2
      17 hours ago

      (edit) To be clear, I’m not an expert, and it’s been at least a decade since I’ve had to work with shader programming. My knowledge could be completely outdated.


      Important to note that what happens when you skip it is exactly what happens with most games when you run them outside Steam (unless the game itself precompiles its shaders on first launch).

      When the graphics library (Vulkan, OpenGL, or DirectX) needs to load a shader, it first checks the shader cache (or pipeline cache in Vulkan’s case) to see if it can find the compiled bytecode. If the bytecode exists (hit), it is loaded directly into VRAM, much like the machine code of an executable. If it doesn’t (miss), the shader first has to be compiled from its source code into bytecode. This is a CPU-bound operation, which can introduce performance issues (stutters, freezes) and spike the CPU usage. After that, the resulting bytecode is stored in the cache.

      Steam does the same, but preemptively. It scans the game files and compiles and caches any shaders it can find. The difference is only in the timing.

      • FauxLiving@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        7 hours ago

        To add to this, the compile time is usually in the range of a few ms each but often when you need to compile a new shader it’s because a new entity appeared and there are likely several new shaders associated with that entity that you have to compile at once, so you could see a 100-200ms delay on the rendering for larger jobs.

        Often times if you change settings you’ll trigger recompilation of some shaders. This can result in worse performance which people often attribute to their setting change (so they revert it/change it some more, triggering more shader compiling). So, make sure you play a bit once you’ve changed settings before judging the performance.

        Using something like MangoHud which displays CPU/GPU load and frame time graphs (and about a million other customizable things) you can generally see when you’re having shader stuttering. Some games (Path of Exile 2, for example) have in-game performance monitor tools which will specifically tell you when shaders are compiling and how many are in the queue.

    • ramble81@lemmy.zip
      link
      fedilink
      English
      arrow-up
      7
      ·
      15 hours ago

      Pretty much. I was playing BotW on an emulator that was using Vulkan and as I ran into new areas, or new enemies appeared it would stutter as things were compiling (it also has a debug option to tell me when new shaders were being compiled so I knew that’s what it was). I eventually switched to pre-compile. It took about 10 minutes, but after that everything ran silky smooth.