We need to talk about UE4 Shader compilation issues

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by snight01, Mar 12, 2022.

  1. Smough

    Smough Master Guru

    Messages:
    984
    Likes Received:
    303
    GPU:
    GTX 1660
    Dark Souls 3 and Elden Ring for that matter have a lot of streaming stutter and it can also be pretty random, Dark Souls 3 has "stutter portals" to the extreme it can also happen in boss battles, also can stutter or not at different locations. A game that is a bit better on this regard is Nioh, which does have streaming stutter portals, but they are fixed on the map, so that's not a problem, totally playable to me tbh, I consider them "loading" screens, it's not ideal, but at least combat is without issues. What bothers me is that often console games don't do this, so it means it's just beyond lazy PC optimization.
     
    BlindBison likes this.
  2. Astyanax

    Astyanax Ancient Guru

    Messages:
    17,011
    Likes Received:
    7,353
    GPU:
    GTX 1080ti
    https://docs.unrealengine.com/4.27/en-US/RenderingAndGraphics/Textures/Streaming/

    most of the time, its an incorrect default texture pool size and lack of assett warming.

    These vars fix most games

    r.Streaming.FullyLoadUsedTextures=1
    r.Streaming.HLODStrategy=2

    asset warming is detailed here
    https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/PSOCaching/
     
    Aldek, CrunchyBiscuit and BlindBison like this.
  3. BlindBison

    BlindBison Ancient Guru

    Messages:
    2,414
    Likes Received:
    1,141
    GPU:
    RTX 3070
    That's very interesting, thanks -- for those vars, do you input those into an .ini file each game has in its install dir? Or are they console commands? Thanks, will read over that link.

    Seems kinda strange that so very very many UE games all have the same issue though. Especially if it's truly that easy to fix given how many people complain about it (i'm shocked the devs don't notice themselves) seems devs would've caught on and resolved it by now.
     
    Last edited: Mar 15, 2022
  4. CrunchyBiscuit

    CrunchyBiscuit Master Guru

    Messages:
    343
    Likes Received:
    126
    GPU:
    MSI GTX 980 Ti
    I didn't experiment enough with games based on UE4 yet myself (lack of time), but I came across this thread, might be useful (for others too):

    https://www.reddit.com/r/PUBATTLEGR..._you_have_unused_resources_while_playing_you/
     
    BlindBison likes this.

  5. BlindBison

    BlindBison Ancient Guru

    Messages:
    2,414
    Likes Received:
    1,141
    GPU:
    RTX 3070
    Thanks that's also helpful to know -- I'm not sure if tweaks like this actually end up resolving or improving the issues, but something to try if nothing else.
     
  6. Sajittarius

    Sajittarius Master Guru

    Messages:
    490
    Likes Received:
    76
    GPU:
    Gigabyte RTX 4090
    A large amount of Elden Ring stutter is bad thread management (it stutters in many places on a 3090, lol). If you are still playing it, and haven't tried SpecialK, I highly recommend it. On 4k i went from 40-60fps stuttering to a very smooth 70-90fps. It's like a new game. Only problem is you can only play offline (i prefer offline, so this doesn't really affect me).

    https://www.reddit.com/r/Eldenring/comments/t7i37t/specialk_235_nightly_has_an_experimental_feature/
     
    Smough and BlindBison like this.
  7. BlindBison

    BlindBison Ancient Guru

    Messages:
    2,414
    Likes Received:
    1,141
    GPU:
    RTX 3070
    Yeah, I really want to play the game online which is why i've avoided these sorts of mods, but at this point I'd rather have smooth performance with no stuttering. At least the community cares. Fromsoft make amazing games, but holy crap they need to get their tech stack in order. Sadly they seem to have no interest in doing that as far as I can tell. There's a reason all of their games capped to 30 on console still exhibit the same frame pacing behavior as the previous ones all of these years later -- it's like they don't even realize there are problems.
     
    Smough likes this.
  8. Smough

    Smough Master Guru

    Messages:
    984
    Likes Received:
    303
    GPU:
    GTX 1660
    Thanks, I will keep this in mind when I try the game!
     
  9. CrunchyBiscuit

    CrunchyBiscuit Master Guru

    Messages:
    343
    Likes Received:
    126
    GPU:
    MSI GTX 980 Ti
    BlindBison likes this.
  10. Jobert

    Jobert Member Guru

    Messages:
    102
    Likes Received:
    39
    GPU:
    RTX 3080 ti
    You are oblivious as hell. Fallen Order stutters and hitches more than any other game I can think of. It is NOTHING to do with my pc as 95% of the stutters and hitches happen in the exact same spots on all FOUR setups I have tested it on. It cant just be asset loading as there are some spots where you can get stutter after stutter after stutter just walking for a few seconds.

    The type of sync you are using in the game will greatly impact how bad and how noticeable it is. Even if I am at only 60 fps vsynced then it will still have numerous dips below 60 fps with the occasional massive fps drop. The ONLY fps cap I have seen that it can maintain is 30 fps. Freesync and Gsync can smooth out some of the little fps drops but I have seen it make the areas with big drops even worse than regular vsync.

    IMO Unreal Engine 4 is a POS as about 90% of the games out there using it have numerous stutters.
     
    Smough likes this.

  11. Astyanax

    Astyanax Ancient Guru

    Messages:
    17,011
    Likes Received:
    7,353
    GPU:
    GTX 1080ti
    stop looking in the mirror.

    > I played it on PC. The only stutter occurred when traversing certain parts of the levels, cause by asset loading. Asides from that, it ran very well.
     
    Archvile82 and Horus-Anhur like this.
  12. Jobert

    Jobert Member Guru

    Messages:
    102
    Likes Received:
    39
    GPU:
    RTX 3080 ti
    So another oblivious clown. AGAIN 95% of the stutters happen in the same goddamn spots across multiple setups I have tested it on so I dont give a crap that you "think" it runs fine. There is a reason that digital foundry says the pc still has a stutter issue ever time they mention this game.

    If I post a video of an area with numerous stutters I would love to see your asinine response as you sure as hell would not be able to show the area being smooth on your end.
     
    Smough likes this.
  13. Horus-Anhur

    Horus-Anhur Ancient Guru

    Messages:
    8,638
    Likes Received:
    10,691
    GPU:
    RX 6800 XT
    You are angry that other people didn't encounter the same issues as you did, in a game?
    WTF is wrong with you?

    Here is a tweak guide that might help you get better performance in UE4 games.
    https://forums.guru3d.com/threads/i...-streaming-shader-compilation-stutter.442485/
     
  14. BmB23

    BmB23 Active Member

    Messages:
    93
    Likes Received:
    34
    GPU:
    GTX 1660 6GB
    This is just nonsense. Games on PC have included precompiled shaders for decades.
     
  15. Astyanax

    Astyanax Ancient Guru

    Messages:
    17,011
    Likes Received:
    7,353
    GPU:
    GTX 1080ti
    GTA4 the most obvious example of why thats a bad thing.
     

  16. BmB23

    BmB23 Active Member

    Messages:
    93
    Likes Received:
    34
    GPU:
    GTX 1660 6GB
    Games like Crysis also have them, you can purge the precompiled shaders and see what a stuttery mess it turns into. GTA4 is just a bad port in general.
     
  17. Horus-Anhur

    Horus-Anhur Ancient Guru

    Messages:
    8,638
    Likes Received:
    10,691
    GPU:
    RX 6800 XT
    You clearly don't understand the new challenges with low level APIs and shader compilation.
     
  18. dr_rus

    dr_rus Ancient Guru

    Messages:
    3,886
    Likes Received:
    1,015
    GPU:
    RTX 4090
    There is a difference between shaders shipped in an intermediate API format (DXBC/DXIL/SPIR-V) and shaders actually compiled for a target GPU h/w.
    I don't think there's even one game which has shipped with the latter.
     
  19. That's irrelevant. You can't precompile shaders to a specific GPU via any API. That's drivers job and it can also be deferred. There is nothing wrong with intermediate, precompiled bytecode.
     
  20. dr_rus

    dr_rus Ancient Guru

    Messages:
    3,886
    Likes Received:
    1,015
    GPU:
    RTX 4090
    That's relevant to the thread speaking about shader compilation issues which are a result of driver compiling shaders from intermediate to h/w digestible binary format.
    It's way more rare when shaders are shipped in HL representation and are compiled down to intermediate before passing to driver. In fact I can think of maybe a couple of games which shipped like this during the last dozen of years.
     

Share This Page