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.

Question URP Low performance, vs built-in - Empty Scene

Discussion in 'Universal Render Pipeline' started by morphex, Nov 28, 2022.

  1. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    99
    It seems I have a problem somewhere and I cant figure it out.
    This is all (In Editor) I haven`t tried a built version.
    I have a 1080 GTX with latest drivers and 3950X.

    When I create a empty project with URP I get around 80 - 100 FPS on empty scene.
    When using the Built-In get roughly 400 - 500 on the same default empty scene.

    Things go to a crawl if I start adding custom passes (vs applying them on OnCameraRender), the same shader goes from 20 Fps in URP to around 100 in built in. (URP settings are the default High, using low, or normal, makes almost no difference overall).

    I have tried this on 2021, 2022, 2023 version and its the same across.

    Is this supposed to be this way? I usually see people saying they get massive FPS gains from URP, but so far, I see a massive performance drop.

    Anything I can do/debug?

    P.S If anyone has 1080 or similar I would love to see your performance metrics (FPS in empty scene, in editor) just so I can get a ballpark figure if I am somewhat on the correct spot.
     
  2. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    289
    Hi, you should see higher fps on URP if the bottleneck is on CPU (rendering thread).
    • SRP Batching -> reduce Draw Call costs
    • URP rendering is designed to use less draw calls than Built-in.
    URP does not have extremely simple shaders by default, so it won't help much (by default) when the project is GPU bound.

    (I don't think that there'll be the same empty scene fps on these two RP)

    I don't suggest comparing Frame Rates in an empty scene, because it won't tell us where the bottleneck is.
    • URP 100fps: either CPU or GPU takes 10ms to render one frame.
    • Built-in RP 500fps: either CPU or GPU takes 2ms to render one frame.
    You can try Unity's Profiler to find detailed rendering information.

    Here is an example that I found on the internet:
    ProfilerExample.jpg
    You can see that the bottleneck is on GPU, the actual CPU time is around 1-2ms.

    Also, the two RP may have a different empty scene:
    • URP might have enabled (post-processing) Volume in its empty scene, while Built-in doesn't.
    • The update of URP Volume consumes some CPU resources, and may reduce empty scene fps. VolumeUpdateFrequency.jpg
    • URP may have SSAO turned on in its empty scene.
    • ... (could be something that I don't know)
    • They might have massive draw calls in the project, which means the bottleneck is on CPU.
    • There might be severe opaque overdraw issues in their project (bottleneck on GPU), and the cost of severe overdraw is highly reduced by Depth Prepass (Depth Priming in URP, seems to not exist in Built-in). DepthPriming.jpg
    • ... (some platform-related optimizations that I don't know, there're many of these in URP rendering)
    I suggest using whatever RP that you are most comfortable with.

    Some users might be stuck to Built-in because of having many RP-related resources (including experience).

    I am a new user so I don't have many resources that force me to stick to Built-in.

    So the reason that I decided to learn & use URP is mostly because Unity won't add new SRP features to Built-in.
     
    Last edited: Nov 29, 2022
    tmonestudio likes this.
  3. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    492
    Hι,
    to my experience and after several stress tests with actual scenes on multiple devices, in most cases there is a slight memory/cpu overhead but generally higher performance (FPS) using URP than Built In ranging from 10 to 20% which is a significant difference.

    Τhis does not mean everyone should choose URP for their project. For many people the Built Ιn may be the suitable choice for technical or other reasons.

    You should not judge from an empty scene though.
    List your requirements, create a demo scene with some actual test assets that represent an approximation,of the potential assets and level complexity you intend to use, and then test your scene on the intended devices.

    It should not take you more than a few days to test with readymade assets similar to the asset specs you intend to use (there are several sources you can get assets for free) or perhaps some test assets you already have.

    URP does not really require any additional resources compared to Built-In and has a very light learning curve. You can use all your art assets exactly as they are. Only switch the materials/shader.

    SRP features can't be added to Built In.
     
    Last edited: Nov 29, 2022
    fuzzy3d likes this.
  4. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    99
    It seems most of my FPS issues come from CPU side of things based on the profiler, which is weird, taking in account its a pretty decent 3950x, the empty scene is taking roughly 13MS (VSYNC is disabled). So not exactly sure whats going on here.
     
  5. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    289
    The Profiler should list out detailed information about rendering.

    You can check what causes the CPU to spend 13ms in total for each frame.

    Also, the Frame Debugger is also very useful if you want to confirm if something is completely disabled.
     
  6. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    214
    I don't test FPS in the Editor, but in the builds and Unity Editor off.
     
    Last edited: Nov 30, 2022
    soleron likes this.
  7. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    492
    Exactly.
    It is ok in order to get a rough idea, but consider the engine overhead which ranges from 20-30% and you see that there is no way to fine tune your scene accurately and have your game look its best, by testing for graphics performance in the engine.

    Have a look here to get some general ideas.