Search Unity

URP Runs Slower than Standard Pipeline

Discussion in 'Universal Render Pipeline' started by LeifStro, May 6, 2020.

  1. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29
    So I've been doing some basic benchmarking between the Standard Render Pipeline and URP (Universal Render Pipeline). I set up a basic toggle between 2 states:

    State 1) Universal Render Pipeline (URP), all renderer (non-UI) materials in scene use a shared material - SimpleLit Shader. Quality = default, with no shadows
    State 2) Standard Render Pipeline, all renderer (non-UI) materials in scene use a shared material - MobileBumpDiffuse Shader. Quality = default, shadows

    I've run it on Galaxy S3 and Galaxy S5. In both cases the URP runs significantly slower.
    ** Pictures attached show results on both test devices **
     

    Attached Files:

  2. Shaunyowns

    Shaunyowns

    Joined:
    Nov 4, 2019
    Posts:
    328
    Hey @LeifStro, what version of Unity and URP are you running?
     
  3. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29
    Hay @Shaunyowns I am running Unity 2019.3.6f1, and Universal RP 7.3.1.

    In my benchmark I'm careful to just change the render pipeline, and then set all materials in the scene to use the same shared material - thus keeping draw calls etc to a minimum.

    I've since removed URP from my project as I need to keep moving forward with my optimization schedule.
     
    JamesArndt likes this.
  4. JosephHK

    JosephHK

    Joined:
    Jan 28, 2015
    Posts:
    40
    Sadly, it seems that urp is never production-ready for Android
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    To be fair both of those phones are very old and right on the edge of losing support for just about every app let alone most games made with Unity. If Unity moves forward one release of the API the Samsung Galaxy S3 will no longer be able to run anything with Unity let alone built-in support.

    https://source.android.com/setup/start/build-numbers
    https://en.wikipedia.org/wiki/Samsung_Galaxy_S_III
     
    LooperVFX and deus0 like this.
  6. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    You are correct about Samsung S3 as its GLES2.0, but I don't agree with calling a Samsung S5 very old. S5 is a GLES3.0 device and I'm sure most mobile developers still support it and similar performance devices in 2020. Those devices are still very common.
     
    JasonOrtinskid and graphicsayy97 like this.
  7. Finijumper

    Finijumper

    Joined:
    Jul 12, 2016
    Posts:
    79
    I'm facing the same issue. Have you found any way to make URP perform as good as SRP? I like URP because of Shader Graph but can't afford to lose 30fps on mobile devices.
     
  8. Batuhan13

    Batuhan13

    Joined:
    Apr 9, 2017
    Posts:
    117
    Could you check android profiler in urp is there a Semaphore.WaitForSignal in you profiler?
     
  9. Finijumper

    Finijumper

    Joined:
    Jul 12, 2016
    Posts:
    79
    Yes, there is.
    upload_2020-5-11_1-7-51.png
     
  10. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29

    It's not just worse on the phones. My Unity editor runs slower on both Windows 10 and on my MacBook Pro as well. I have roughly a ~20% reduction in performance when I switch rendering pipeline from Standard (Built-In) to the Universal RP. It's not perceivable since my game typically runs at 750-1000 FPS on my Windows machine, but as soon as I switch to URP, the frame rate drops by a couple hundred.
     
    graphicsayy97 and MP-ul like this.
  11. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Are you guys using the SRP batcher? As of now I have worse performance with it compared to Instancing/legacy batching methods.
     
  12. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    273
    I think I quit URP for now
    I've just wrote material conversion script(URP to Built-in) the main drawback for me is the lack of real-time point light shadow
    There's just no way to make an indoor scene with correct lighting
    Performance seems to be a bit unpredictable compared to Built-in pipeline
     
  13. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    Odd. I'm not seeing anything of the sort. I just created the default project for URP, and watched performance in both the stats and profiler windows while turning the render pipeline off and on. Windows 10 here too on an AMD Ryzen 5 1600X, 32GB DDR4-2666, and a GTX 1080. Unity 2019.3.8. URP 7.3.1.
     
  14. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,708
    Ive been having so many issue
    OK so ive been having a ton of issues, slowly im working through them 95% are user error and the 5% tbd. One thing I found that solve many weird issues was simply updating EVERYTHING including my operating system drivers .. etc.
     
  15. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    273
    I don't really have issues it's more like limitations of URP in general and as the game is about to release we had to take some decisions
    And Built-in is more stable and look the same as URP but with real-time point light shadow and with less headache;)
     
    nasos_333 likes this.
  16. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29
    Interesting, maybe Unity HQ is also struggling to reproduce my issue.

    Here is the main problem I have with URP - It is advertised as the DEFACTO pipeline to use in mobile applications. As it apparently has no downsides, but achieves better performance, shader graph, etc, etc.

    This article convinced me that URP was going to help my project: https://blogs.unity3d.com/2020/02/1...-graphics-with-the-universal-render-pipeline/

    Something Unity could do to show that it URP is undeniably better, would be to make a sample mobile application - demo project - that showcases the FACT that switching between Standard and URP improves performance (under certain conditions at least).

    The Boat Attack demo project (shown in that blog) runs poorly, even on modern devices - aka Galaxy S8. It is hardly a good showcase for how awesome URP is. It didn't run at all on my older devices.
     
  17. MrPaparoz

    MrPaparoz

    Joined:
    Apr 14, 2018
    Posts:
    157
    Well, I don't mean to be rude or anything but here it goes:

     
  18. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    LWRP/URP never been made for mobile. It's for low-end PC/low indy graphics. Yeah, URP can run on super-phones, but it's just for marketing purpose.
     
    mcdenyer and JamesArndt like this.
  19. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    yeah ...
    but you can't use built-in if needs to rendering Entities or hybrid rendering!! :|

    and its huge disappointment for Unity vs UE5 Nanite :\
     
    Last edited: May 23, 2020
  20. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Hybrid Rendering v1 still works with built-in renderer. As comparison, Unreal doesn't currently have any entity rendering at all :cool:
     
    LooperVFX likes this.
  21. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    @LeifStro have u reported a bug on this with project included? If you do I'm sure fix or an explanation would be on the way quickly.
     
  22. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    Unreal [UE5] doesn't needs entities when can be handle billions of polygons!!
     
    georgetowersassets and nasos_333 like this.
  23. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    This isn’t true, URP should run on anything that built in can.
    Not only that, it’s meant** to be faster than built in for the majority of cases, especially if CPU bound.
    The long term plan is for the SRPs to replace the built in completely, and Unity certainly has no plans for deprecating mobile support, so of course URP is meant for mobile, unless they have another lower end SRP planned.

    With that said I’m completely dissatisfied with the state of URP.
     
    lclemens, Lipoly and Ruslank100 like this.
  24. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,361
    If is slower in Android, would be worse for desktop too i suppose, so in all cases srandard is the one to use.

    After working with urp have found it to be lot worse than standard, both in features and performance and a complete waste of time so far.
     
    mowax74, JasonOrtinskid and fholm like this.
  25. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29
    I disagree. If you look here at Unity's official blog post on URP (https://blogs.unity3d.com/2019/09/20/how-the-lightweight-render-pipeline-is-evolving/), the first line is as follows:

    The Lightweight Render Pipeline (LWRP) was designed to be a fast, scalable pipeline enabling high-quality graphics across all mobile devices.

    That indicates to me that it is meant for mobile devices, and that its supposed to be a lighter weight version of the standard pipeline.

    Funny story. Every time I attempt to report a bug, the Bug Report window crashes Unity. I tried 4 times, each time crashing my project. If only there was a window I could use to report the Bug Reporter being buggy.


    Unity could easily shed light on this issue by simply making a demo project that showcases the different pipelines, their different requirements/considerations and performance changes. This would help developers determine where in their own implementation they have gone wrong. This project would need to be set up to build out to mobile devices as well.
     
  26. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    Unity have to change their mind ...

    CALL OF DUTY Mobile was built with unity ...
    you can run it on Android 5.1+ phones ...
    for example you can run it on Samsung J6+ [Adreno 308 - 3GB of RAM] smoothly or similar phones ...

    so, we needs URP pipeline that render and handle massive crowds in dense jungles, more powerful, more performance and smoother than built-in pipeline on cheaper GPUS ...
    cheap Adreno and Mali gpus ...

    its huge disappointment for Unity for now :[

    P.S: some unity guys had mentioned that Adreno 500 series and below are very cheap gpus!! o_O
     
    Last edited: May 29, 2020
    Ruslank100 likes this.
  27. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29
    I discovered a benchmark project that Unity provided (https://github.com/Unity-Technologies/PotatoBenchmark) to show the benefits of LWRP (URP) over the Built In Render Pipeline. Running this benchmark on my PC gives the following results (times are in milliseconds):

    TEST - Built In
    101 - FillRate (Lit Shader - Directional Light) AVG: 3.366802 | MEDIAN 3.3335 | MIN 3.3313 | MAX 16.3146
    102 - FillRate (Lit Shader - Multiple Lights) AVG: 3.35932 | MEDIAN 3.3335 | MIN 3.2997 | MAX 7.934
    103 - Realtime Shadows AVG: 3.395531 | MEDIAN 3.3335 | MIN 3.3306 | MAX 7.4129
    104 - Realtime Shadows Cascades AVG: 3.417399 | MEDIAN 3.3336 | MIN 3.3131 | MAX 15.8191
    105 - Batching AVG: 9.759463 | MEDIAN 9.646501 | MIN 8.8666 | MAX 14.4937
    107 - Bandwidth AVG: 3.391731 | MEDIAN 3.3335 | MIN 3.3003 | MAX 8.3398
    108 - FillRate (Terrain) AVG: 3.37315 | MEDIAN 3.3335 | MIN 3.3311 | MAX 8.795401

    TEST - LWRP
    001 - FillRate (Lit Shader - Directional Light) AVG: 3.405262 | MEDIAN 3.3336 | MIN 3.2702 | MAX 8.029799
    002 - FillRate (Lit Shader - Multiple Lights) AVG: 3.388241 | MEDIAN 3.3335 | MIN 3.3303 | MAX 8.079901
    003 - Realtime Shadows AVG: 3.397028 | MEDIAN 3.3335 | MIN 3.3105 | MAX 7.8745
    004 - Realtime Shadows Cascades AVG: 3.390011 | MEDIAN 3.3335 | MIN 3.3201 | MAX 7.5925
    005 - Batching AVG: 7.356091 | MEDIAN 7.2708 | MIN 6.6405 | MAX 14.5456
    007 - Bandwidth AVG: 3.372418 | MEDIAN 3.3335 | MIN 3.318 | MAX 8.368
    008 - FillRate (Terrain) AVG: 3.404876 | MEDIAN 3.3336 | MIN 3.3298 | MAX 9.561999

    The tests show a mix of performance improvements and losses from using LWRP over Built In. The only significant improvement seems to be Batching.


     
    lclemens likes this.
  28. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    273
    An average user will not understand a single line of this
     
  29. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    The tl;dr is that URP performs about the same as built in in those tests.
     
  30. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    Thank god every user's workflow broke and significant engineering effort went towards making a whole new fast render pipeline, to replace the old, aging, inefficient rp, so we can now have roughly the same performance with a lot less features!
     
  31. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I loved node graph shader editor on built-in. Also the source code and ability to fundamentally change the the code of the built-in renderer.
     
  32. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29
    I think you have it mixed up. LWRP (URP) is the one that has shader graph and editable render pipeline. However I have been unable to get good mobile performance with it.
     
  33. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    He was being sarcastic.

    Like this: I see how it was necessary to create a new RP just to implement a feature that the community had already created for built in multiple times and better than Unity’s solution.

    Be careful not to ask for any more features, because they’ll abandon the current RPs and start from scratch, because improving already existing features is for suckers.

    Maybe they need a completely new paradigm just to implement box projected cubemaps this time, who knows?
     
    Last edited: Jun 24, 2020
    georgetowersassets likes this.
  34. LeifStro

    LeifStro

    Joined:
    Mar 23, 2015
    Posts:
    29
    Ah, now I'm getting it.

    Yeah it seems as though some of the major things Unity provides for performance are simple not that performant, or very situational. Even dynamic batching seems to be less performant when I run tests.. A lot of standard tips etc don't hold up when I investigate them more closely. Hopefully using DOTS will give me something lol.
     
  35. liiir1985

    liiir1985

    Joined:
    Jul 30, 2014
    Posts:
    147
    Semaphore.WaitForSingal just means it's not doing anything, just waiting for something to be finished, in your screenshot, it says it's waiting for the targetFramerate signal.

    URP uses linear color space by default, which is meant for pbr rendering, thus not meaningful for prior ES3.1 devices, so if you are not using dynamic point lights, not using pbr rendering and mainly uses mobile/diffuse shader, and don't have scene with more than 100k triangles, and don't use any post effects, you won't benefit from urp at all.Galaxy s3 is already an antique device, we could barely find any device older than s7 anymore here in my country, don't know how's the situation in your country though. In our test, urp indeed perform much better than builtin pipeline, especially if you are using dynamic point lights, or have complicated scene, with hundreds thousands( typically 400-700k) of triangles and 500+ batches. builtin pipeline struggles to render at any meaningful framerate on a snapdragon 625 device(under 10 fps), while urp could achieve stable 30 FPS.

    PS. device under snapdragon 625 or comparable soc with mali gpus are out of concern, since they have less than 10% users atm overhere
     
    Last edited: Jun 24, 2020
  36. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    273
    I can confirm that heavy scenes works much better in URP
     
  37. kvelertak

    kvelertak

    Joined:
    Nov 11, 2020
    Posts:
    6
    mmm, but if I create an empty 3D proyect without stuff I have 3200 FPS, but with an empty project with URP I get 1400 FPS... then you mean that the performance will be better in URP if I have loaded the same project with a real game?
     
  38. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,361
    I wonder how urp would behave with point light shadows enabled versus the standard, as now any benchmarks are meaningless as are not comparable in features
     
  39. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    3200 fps equals 0.03125 milliseconds.
    1400 fps equals 0.07142 milliseconds. So it runs 0.04017 milliseconds slower.

    60 fps equals 16.66667 milliseconds. If your frame budget is 16.66667 ms, then 0.04017 ms represent 0.24% of that budget. That's not really a problem in my opinion.

    Don't use fps to express performance, it just causes confusion, because it's not linear. Express performance in milliseconds, much more reliable.
     
    marcospgp, Ryiah, NotaNaN and 4 others like this.
  40. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    273
    Yes, you should test with a real scene in player build ,the editor add more overhead
     
  41. kvelertak

    kvelertak

    Joined:
    Nov 11, 2020
    Posts:
    6
    thanks for the answers... I was not realized in this point, until now I was obsesed with the FPS. Then you recommend to migrate to URP?
     
  42. EternalMe

    EternalMe

    Joined:
    Sep 12, 2014
    Posts:
    183
    Whats with the mobile3d template? Is it URP? Is it some-have optimized for mobile? Is URP good for mobile?
     
  43. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    Sorry to not express this in ms because it's too late I uninstalled URP.. Tried it quite a few times during their development.. Well, I was getting 300FPS with the URP, then 400+ FPS with built-in.. That and shadows look better in built-in, plus I can have deferred and many many lights. Also, point lights have shadows in built-in! They do not in URP (still!! after being requested and super voted)..

    If I want to add a hand written shader in built-in? Easy peezy, I can write one easily.. With URP it's such a huge pain to write one. Wanna Post-Render so you can quickly do an image post effect? Done, there's an event for that in built-in. Wanna do it in URP? Gotta add a ton of boilerplate code, add an asset, etc, etc.

    How is URP gonna ever beat built-in if it a) doesn't do what built-in can (which I think they're now calling it legacy?), and b) If the performance is not better..

    Edit: Also sorry for the sourness..
     
  44. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    One feature that URP has that helps my performance a lot is the forward base renderer, ensuring all lights are handled in one pass. Builtin does not have that. However, they could have easily implemented one into builtin, as others have. And forward base in builtin is faster than forward base in URP
     
  45. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,192
    Six years is a lifetime in this industry. A six year old phone can easily be several times slower than a modern phone which is the problem here. Your phone isn't missing features. It's missing the raw performance that is now required by modern game development.
     
    Last edited: Jan 3, 2021
    fuzzy3d likes this.
  46. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    You don't even need six years, you can easily find a larger difference in performance between a $200 phone and a $1000 one, both released on the same year.

    You can also find $100 phones in 2020 which outperform the Samsung Galaxy S5.
     
    fuzzy3d likes this.
  47. orville_redenbacher

    orville_redenbacher

    Joined:
    Sep 9, 2018
    Posts:
    34
    So what's the general consensus on URP now? Is it about as performant as built-in? Are there real benefits to using shader batching vs material?
     
    James_Arndt and ROBYER1 like this.
  48. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    It seems to depend on the project. Some projects run faster, others run slower.
     
    James_Arndt likes this.
  49. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    I think you'll have to browse through all the feedback to create your own mental image of URP because there are too many parameters at play. I had to run a battery of benchmarks that fitted the particulars of my game.
    Regarding batching, again, in my benchmarks, shader batching is much faster, especially if you cannot be bothered atlasing textures. Also shader batching doesn't break with lightprobes.
     
  50. James_Arndt

    James_Arndt

    Unity Technologies

    Joined:
    Jan 4, 2021
    Posts:
    22
    This. I will only add I've seen a commonality in posts about this. Regarding using URP and building to low or mid-range Android mobiles. In those instances it seems the built-in renderer provides a bit more performance. I wonder if it has to do with folks not customizing URP and tweaking features for performance? You'll have to make those choices as a developer. What device generations do you want to support (how far back)? If you do intend on supporting mid-ranges, ask yourself. If you choose URP, are you willing to put in the work to check the device capability your game will be running on and filter aspects based on device capability. i.e. enable post processing on latest gen devices, disable it on mid-ranges. In all fairness this is something you'd likely have to do with any rendering approach you take.