Search Unity

HDRP significantly lower frame rate than Built In.

Discussion in 'High Definition Render Pipeline' started by ODINKONG, Nov 9, 2020.

  1. ODINKONG

    ODINKONG

    Joined:
    Nov 4, 2014
    Posts:
    112
    I added the HDRP package to my project of 4 months. The project was running at 800 - 900 fps with the built in pipeline. With HDRP it's running between 200-300 fps. This is with the default HDRP settings. Is this a frame rate hit I should be concerned about? I don't want this game to be hugely demanding to run. Is HDRP really production ready and does it make sense to use it if we are a 2 person team with very little graphical code experience? I kinda love the way it look even if it is a little unruly sometimes and the VFX graph excites me, but I'm worried about getting to a point where the game is way to demanding and not being able to figure out why. Should I be using the built in pipeline for a long term commercial project?

    I'm using unity 2019.4.13f1 LTS.
     
  2. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    First of all, it's better observe the cost in milliseconds rather than frames per second as it's easier to actually see the true cost in time that way. 800fps would mean your frame time was around 1.25ms and 200fps would mean it took 5ms. Basically what you see here is that HDRP took your test scene 4ms longer to render which frankly is expected considering how fast it ran in built-in.

    HDRP is always going to have way more overhead on simple scenes. In addition you will see way more radical performance reduction the weaker the computer you run it with as HDRP doesn't scale that well to low end computers. If the raw performance is a concern for you but you still want to use shader graph and visual effect graph then URP could be a better option.
     
    ODINKONG likes this.
  3. ODINKONG

    ODINKONG

    Joined:
    Nov 4, 2014
    Posts:
    112
    Maybe I should look into URP. I'm using a Geforce 2070 super and a Ryzen 3900xt and I'm getting some noticeable stutter in build with very simple scenes using HDRP. I'm still unsure if it's a good idea to use URP or HDRP. Should I still be using built in for production? or is that worry unfounded?
     
  4. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    On complex scenes overhead is even more.
     
    ODINKONG likes this.
  5. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    This is too little information.

    Are you using forward or deferred? What are your shadow settings? How many lights?

    HDRP is Unity's attempt at emulating UE4, so by default it comes with all sorts of post-processing enabled.
    Vanilla built-in has no post processing whatsoever, you have to either use the post-processing package, a 3rd party asset, or a custom solution. Did you?
     
    ODINKONG likes this.
  6. ODINKONG

    ODINKONG

    Joined:
    Nov 4, 2014
    Posts:
    112
    I'm using one directional light, and I've tried turning off all the post effects in the default volume profile, I've tried lowering all the quality settings, no matter what I do there is significant frame stutter in build, and HDRP is adding about 5 MS to the render times even in a scene with just 2 buttons.

    It seems like no matter what I do the frame rate has moments when it drops to 25fps in build even though the average is high around 200. Has anyone actually gotten this running with a stable frame rate in build? If so how much tweaking did it require. Should I just be using built in with Post effects at this point?
     
  7. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    I'm using it on a 2060 just fine, depending on how much post processing / lighting I use, I average about 30-75fps on a 2.5k monitor, 70-100fps on a 2k monitor (rough numbers, dont read much into the highs and lows). Thats basically meaningless, since it only makes sense when you have some idea of what I'm actually doing, but performance hasn't felt wonky to me at all ... if anything, I'm pretty surprised at how much I can push it at times.
     
    ODINKONG likes this.
  8. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    Have you checked if volumetrics are enabled? I have found the volumetric fog to be the most performance hitting feature in 2019 HDRP.

    Also, if you haven't added the "fog" override then it might be already enabled by the default settings. To disable volumetrics either disable it in the HDRP settings or add "Fog" as a volume override and disable volumetric fog.

    In my 2019 project that consistantly keeps up 190FPS on a RTX2080, the FPS drops to 90 instantly with volumetric fog on.

    Also there is the HDRP overhead...which there is no way around it :)
     
    ODINKONG likes this.
  9. ODINKONG

    ODINKONG

    Joined:
    Nov 4, 2014
    Posts:
    112
    So I guess when you have 800 - 900 fps it's very easy to take some big frame hits. I should have been looking at the MS which was fun. I was alarmed by it originally by some snags in the frame rate all the way down to 25 fps I found the profiler. It turned out this was related to two issues that had nothing to do with HDRP. One was that I was logging every button press and release to make sure I hadn't double subscribed any any functions to the events in the new input system. I didn't realize logging was so expensive but it makes sense now that I think about it, and it also coincides with the chugging being worse in build because in that case it has to also write the log to the hard drive. The other issue has to do with a method called CheckForUnpairedDeviceActivity that is also used in the new input system. I've asked the team behind this about it and they have already created a fix that is currently pending. More info about this

    Ultimately though I don't want this game to be tough to run on lower end devices. I'm not planing on mobile or anything like that, but when I threw HDRP on a year old laptop with a decent NVIDIA card it was struggling to get 25 fps with 0 post effects including volumetrics. I threw built in on the same laptop with Bloom, temporal anti aliasing, screen space reflections, DOF, Motion blur and color grading, and I got a solid 60 fps. Maybe I'll do some more testing with it, but for now I think I'll wait till the hardware catches up a bit for HDRP.

    HDRP did look better, and I'm sure you could make it look ALOT better if you spent more time with it, but for now I'm happy with built in's post effects and performance. I'm looking into a few asset store packages for volumetrics and fur for built in as well.

    Also jjejj87 you were right about the volumetric that was a huge part of the overhead, but its still probably too much overhead for it to make scenes in our game as our scenes are not complex.