Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

URP vs HDRP for performance

Discussion in 'General Discussion' started by G_Trex, Sep 26, 2020.

  1. G_Trex

    G_Trex

    Joined:
    Apr 20, 2013
    Posts:
    98
    I'm currently using URP for most of my projects, but recently upgraded one to HDRP.

    While I like what I see, I was wondering if there is actually a performance difference with them?

    I know URP is better with performance than Standard RP, and I know that HDRP has features which may cause a loss in performance (more complicated shaders, more light options etc).

    But, for example, if I have exactly the same scene in both pipelines, and I only use the URP lit shader for the URP version , and I only use the HDRP lit shader for the HDRP version, does the URP still rune better in terms of fps and ms?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,629
    As far I am co cerned, the major dlfference is platform's / hardware support.
    For example you dont want use hdrp with mobiles.

    You can perhaps do stress test of specific shaders, to see, if performance differ.
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,007
    yes
     
  4. G_Trex

    G_Trex

    Joined:
    Apr 20, 2013
    Posts:
    98
    OK. So, I just bit the bullet and did a couple of decent tests myself.

    I created 2 empty projects, one URP and one HDRP. I imported exactly the same scene created with another software (daz studio). No special shaders used. Just the standard lit ones for each pipeline. No special post processing, just what the default camera has.

    Results are in the attachment below.

    In example 1, hdrp is 85.1% of urp.

    In example 2, hdrp is 82% of urp.

    So, it looks like URP is 15-18% more efficient than HDRP.

    One of the main reasons I upgraded to URP from standard some time ago was that it increases my game performance from around 18ms to about 15.5ms. Looks like if I upgraded my projects to HDRP, I would loose what I gained there.
     

    Attached Files:

    EKafer, smichaelg and laurentlavigne like this.
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,007
    you're a good man
    i know that because i've been spamming the forum with tons of benchmarks too, it's the only way

    i didn't expect hdrp to have the same perf as built in
    hdrp might turn out faster than urp in scenes with tons of objects that are not onscreen: hdrp has compute culling
     
  6. useraccount1

    useraccount1

    Joined:
    Mar 31, 2018
    Posts:
    267
    If you want to upgrade your performance then you should start with optimizing batches.

    From what I have read on this forum, HDRP is slower by default than built in and URP, but scales better the more textures you use with the default material.
     
  7. frbrz

    frbrz

    Joined:
    May 10, 2016
    Posts:
    76
    What are your results with Static Draw Call Batching turned on in your objects? Mark them as static.
    Now, what happens when you turn on GPU instancing in the default shader? This has helped me in the past. You can use the Frame Debugger to check if instancing is actually used.
    What do you see? Is HDRP better for you with those things in mind?
     
  8. aero80

    aero80

    Joined:
    Jan 29, 2013
    Posts:
    27
    I think this comparison doesn't make any sense. They are there to solve very different problems. It would perhabs make more sense to compare builtin pipeline to URP.
     
    useraccount1 likes this.
  9. frbrz

    frbrz

    Joined:
    May 10, 2016
    Posts:
    76
    This comparison does make total sense. For some people a thin line can decide between URP and HDRP. In places like reddit you can read lines like "if you want to target desktop, mobiles and consoles, go for URP. If you want to target consoles and desktop mostly you can give HDRP a go". But those lines a gross generalisations.
     
  10. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    99

    Not only that but HDRP is not entirely if you want to target consoles since it doesn't support the Nintendo Switch. HDRP is basically "I want to make an AAA game in Unity".
     
  11. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    546
    If u dont need features from HDRP there is no point for u to go with HDRP...
     
  12. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,239
    Yes and no. HDRP is currently the only renderer receiving support for AMD's FSR and NVIDIA's DLSS. With one of those technologies enabled you can very easily make up the difference and even surpass it without a significant loss in quality.

    Below is a link to my first and currently only experiment with DLSS.

    https://forum.unity.com/threads/amd-fsr-and-unity.1119274/page-2#post-7280614
     
  13. Ng0ns

    Ng0ns

    Joined:
    Jun 21, 2016
    Posts:
    196
    Any updated thoughts on this? My testing seems to be more or less in line with the findings above, but I do wonder how well URP will scale once scenes become more complex.
    HDRPs extra features are welcome, but in my case not needed. Would it still be worth going HDRP, ex. to get access to DLSS etc?
     
  14. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    631
    But really, URP should also be able to support these features, and others, such as TAA and camera-relative rendering.

    We should be asking why URP is missing these features and being allowed to fall further and further behind, when it’s the more scaleable, more cross-platform-friendly choice.
     
    Stardog, Kreshi and Ng0ns like this.
  15. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    324
    Considering they couldn't even get the post-processing stacks right adding more HDRP features to URP would most likely make URP even less performant than it already is.

    Until URP provides a significant advantage over BiRP for all usecases that BiRP targets (that HDRP does not already cover) I don't think features should be our top concern.
     
  16. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,860
    The specific reasoning for doing this is making it easier to pick and choose things on the considerably more scalable URP instead of being forced into using the rather bulky HDRP, especially considering how some of these things are pretty standard features in most 3D renderers, even smaller scale ones.
     
  17. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    631
    An optional TAA or upscaling postprocess shouldn't hurt performance unless you turn it on.

    Ideally, the postprocessing system should be a standalone package that works with both render pipelines (and potentially with custom render pipelines too), and this should include any postprocessed AA/upscaling functionality.

    Also, let us choose, for example, whether we want 'HD Bloom' or 'Fast Bloom', not be tied to one or the other based on the render pipeline choice. Better for scalability, better for artistic control.
     
  18. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,660
    URP is basicly targeting mobile devices/low end PCs/consoles. HDRP is targeting high end PCs (high fidelity), and the shaders are designed as to those targeted systems. Im not a mobile dev, but i will say HDRP is the worst choice for mobile game for many reasons.

    If you dont like URP remember, BuiltIn is the next best choice, and the best "all around" version available, as BuiltIn can scale to both high end and mobile.
     
  19. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    HDRP can be a bit faster under full load, lots of lights and post, volumetrics when paired with DLSS, something URP doesn't really have. Trying to plug the missing stuff HDRP has like clouds and volumetrics with asset store can be punishing on performance as well, particularly as many effects don't scale well to 4K.
     
  20. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,239
    FSR 2.0 too which is now starting to show up on the consoles.

    https://www.ign.com/articles/amds-fsr-20-is-now-available-for-xbox-series-xs-and-xbox-one-developers
     
    hippocoder likes this.
  21. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,860
    Sure, but not having a post processing stack? Or any of the other baseline features even most lightweight renderers have?
     
    Gravesend likes this.
  22. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    CPU usage always higher with HDRP.
     
  23. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    324
    I'm not advocating that Unity shouldn't add new features. I use URP as much as the next guy. I want features too.
    I'm advocating that boosting URPs performance should be considered top priority over adding new features.
     
  24. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    631
    There's lots of people pushing HDRP and now you're even claiming it can outperform URP.

    So are people successfully shipping HDRP games on console these days? - what are the top console releases using it? Are there good examples on PS4/Xbox One, or just on next gen? Are they hitting 60fps (at least on next-gen)?
     
    Last edited: Jul 20, 2022
  25. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It is not a claim but a specific use case that I have tested it on. I have tested HDRP on console as well in the past, but that was a while ago so I don't feel it is accurate to talk about that now.

    But recently I had an URP project and ported it to HDRP. At the higher resolution with fully loaded effects, HDRP easily kept up (in fact its framerate barely changed) but URP dived and kept on diving as the resolution kept going up. And I had not even added a volumetric replacement at that point.

    Tool for job, not a flaw or a contest. If you are doing console graphics and don't want to risk asset store varying quality, then HDRP will be faster (with DLSS set to run after post on desktop). Probably FSR too but I did not test FSR and could not get it working in URP.

    So I'm not sure what the problem is, it's surprising but for me HDRP was faster for this case. That is why I recently moved to it. But may move on anyway, since HDRP is also lacking and does not scale either.

    Why don't people test both? But please keep in mind, testing a barebones scene will show URP several times faster, which is obvious. Also people do not know how to manage HDRP bandwidth (it should be the first thing to do to use the performant profile and build up from there & leverage it's strong upscale options).
     
  26. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    The problem is that switching between URP and HDRP is not a simple toggle. Getting an apples-to-apples comparison can be non-trivial.
     
  27. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,369
    So, would you recommend using Unity for low-poly visuals? Like Inside style?

    upload_2022-7-20_17-41-58.png
    upload_2022-7-20_17-42-11.png
     
  28. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If it reduces the time it takes to make the game. Because you will need to bake very little with HDRP but maybe bake more and do more work in URP for similar visual quality. That is an important part of my rationale in choosing a pipeline. HDRP does have a lot more toys.

    If you are not targeting hardware less than a PS4, then why would you use URP? URP doesn't have much engineering in comparison, and no GI, and the colour depth is way less than HDRP's.

    HDRP plain looks better, even in R11G11B10 which is HDRP's low bandwith performance mode. This looks way nicer to me than URP's R8G8B8 and doesn't cost much more.

    HDRP default is of course R16G16B16A16 - but I don't think it is needed.
     
  29. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,369
    One thing that ticks me off in URP is light limit. I'd be happy with BiRP but it doesn't have decals.

    I'm interested in PC and PCVR, but not Quest VR. I think modern computer might handle HDRP in VR though not at 144 Hz, especially in the visual style I want.
     
  30. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I read about HDRP running well on PSVR2, with eye tracking optimisation. But even then it will probably be slower than using URP because several things in VR HDRP does badly. It's very bad at doing any work twice. This includes motion blur, which from another thread was the main culprit for slowdown. Remove that, and remove a lot of the beauty post that HDRP brings and it's value for VR plummets.

    I suspect that one couldn't really use the GI or other features of HDRP in VR either. I haven't tried, but it's not a path I am going down for VR. I'm not sure Unity itself is the right move for high end graphics that have to scale.

    Case in point, they have just released a new volume feature that lets you use shadergraph for volumetrics. But it's very prone to performance issues and will never scale to something like fluidninja. Staff confirmed that, at least.

    So for VR, perhaps URP is best unless you guarantee something like PSVR2 being baseline.

    Anyway Unity decided that URP and HDRP are separate so here you are having this problem. I'm sick of that problem.
     
  31. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,831
    One of the symptoms of Unity not knowing where they are going. It sorta makes sense when they are trying to scale from low end android up to high end movie quality visuals. But now we're in this jack of all trades but master of none situation. It's not particularly great for low end mobile, nor is it good at high end visuals at scale.

    And users are forced to deal with a lot of fragmentation and missing features. Not to mention breaking changes being introduced on the regular, feels like we're beta testing the packages for Unity even 4 years later.
     
    n_i_e likes this.
  32. Liderangel

    Liderangel

    Joined:
    Jul 8, 2018
    Posts:
    99

    Most games end up targeting all 3 major consoles, and this includes the Nintendo Switch, which HDRP doesn't support. So in the end there is like 0 real reason to go for HDRP at the moment.
     
  33. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Not really. Devs don't really make money on mobile with URP. Built-in would be fine with it. Devs don't make big money on switch either. You get the occasional outlier which is heavily promoted. But that's not the thousands that fall out of sight never to be seen or monetised again.

    Basically if you aren't doing some pretty clever analytics and lightweight mobile only stuff, you really should beef up your graphics to the max, which means ignoring switch. It's old and by the time a game gets finished today, a completely saturated indie market.

    I guess some people will still try and I wish them best of luck.
     
  34. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Right now the Switch is, overall, the 2nd best selling platform for indie games after Steam, even with the clutter. At work we had quite a few indie publishers asking for quotes for ports of PC games where the Switch is either the sole platform or the priority.

    But that's for "indie looking" games (2D, low polygon, highly stylized). Games which feature high-end graphics (like Stray and Kena, for example) and can pass for an AAA game at quick glance fare better on Sony and Microsoft platforms.

    So if you're going HDRP you better we'll go all the way. If all you can achieve is looking like Inside while having 4x the hardware requirements you're leaving money on the plate.
     
    bluescrn likes this.
  35. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Starting today, a typical indie will take a couple of years to make a game, then get it on switch. If they can and that brings in more money for the (frankly more engineering, lack of tooling, features and more optimisation) then sure - I hope switch is bankable in 2 years time. For nearly all indies doing 3D, I dunno if it's worth it, today. I guess it depends on the indie and the game itself.

    If you're doing switch you might as well also have mobile in the plan, and if you are doing mobile, why do it by halves? if this is about money, go all in on Unity's core economy business.

    You're talking about money as it has been made so far by indies, and my experience, plus the people I'm talking to... they don't make all that much hitting the low end any more.

    And I'm talking about which way the winds are blowing. So your advice is correct. It's the kind of advice I gave out pretty much every year up until recently.

    Nowadays, there are way too many indies doing high end visuals now. I don't know if ugly title X that took longer to make is going to be a great bet in 2-3 years time. I think the market is getting sick of ugly indie. That's baseline for a free phone game now. If that is the target, the low end that can scale, then it will take more work for sure. Optimisation and cross platform, all hard jobs.

    If though you're doing something that can mask your lack of resources as one guy and hit apparently high-end visuals even with a few asset store things, you could be in a good place. HDRP, one man:

     
  36. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    I agree, starting right now for a two years release things are less straightforward. PS4 and Xbox One might not be relevant anymore and Nintendo might have a Switch successor out which HDRP actually officially supports.

    But Switch and mobile are completely different markets. Non GaaS games simply don't usually sell significant numbers on mobile, and the whole "you have to update the game every 6 months if you want it for it to remain on sale" doesn't help either.
     
    Last edited: Jul 21, 2022
  37. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,239
    Xbox One will likely hold its relevancy for longer than normal thanks to a combination of Game Pass and how hard it continues to be to obtain the newer models.
     
    Last edited: Jul 21, 2022
    d3eds and MadeFromPolygons like this.
  38. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Xbox S has some trashy hardware for sure but matrix demo runs more than fine on it. That's something indies should not ignore, depending on their title, the artistic reach, engine choice and when the game will be done. Add a GPU price crash and it is at least no longer cut and dried what indies should pick.

    Well worth making a thread about at least.
     
    d3eds and Deleted User like this.