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.
  2. Dismiss Notice

Basic URP/Mobile questions

Discussion in 'General Graphics' started by compyler, Jan 2, 2021.

  1. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    Hello,

    I have some very basic question about URP:
    1) I am using Unity 2019.4 and loaded an older project (created with Unity 2018). How do I know if my project uses URP? I checked "Project Settings" > "Graphics" and under "Scriptable Render Pipeline Settings" there is "None". Does this mean I do NOT use URP? What am I using then?

    2) Does using URP give a performance increase on mobile?

    3) I am making a 3D game for mobile and need 2 effects: Bloom (for objects that are not moving) and Blur. Until now I used the PostProcessing stack v2 and used Depth of Field to simulate blur.
    My question: Whats the best approach to get Bloom and Blur with good performance on mobile? Use the PostProcessingStack v2? Use PostProcessingStack v2 with URP? Or use a blur/bloom asset from the asset store?

    Thanks for any help!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    If it’s a 2018 project, it didn’t use the URP since that didn’t exist until the end of 2019. AFAIK the first version of Unity to support the URP was 2019.3. The Scriptable Render Pipeline system was added to Unity to make it easier to add custom rendering paths to Unity that replace the built in rendering paths that already exist, and would be what your 2018 project is using. They’re the essential the same built in rendering paths that Unity has used for roughly the last decade.

    Yes. And no. Depends on your project. According to Unity, with their internal test projects, it’s faster. However a lot of users have found the URP performs basically identically, or in some cases slower. Honestly, most mobile projects are slow for reasons the URP won’t help, because you’re limited by game code, vertex count, or fill rate. URP can help in some limited cases of multiple lights, or lots of unique materials using the same shader, but generally quite minor improvements outside of extreme setups.

    The best performance is to not do any post processing on mobile.

    The post processing stack is mainly designed for desktop and console platforms. Really only the top end mobile devices can really handle it. I would definitely recommend using an asset from the store, or writing one yourself. Mother funny thing is bloom and blur are both essentially the same effect. Both blur the scene, bloom just adds it back on top, and blur replaces the output with the blurred version.
     
  3. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    Thank you very much for your answers bgolus! You answered all of my questions:)

    Another question about performance: In the top right corner of each gameobject is a "static" checkbox and as I understand checking it is required for baked lighting. But even if I dont use baked lighting: Does it improve performance to check this box? (I could imagine Unity could batch together static objects?)
     
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,450
    Answer to the last question, try to make sure that many objects use the same material so they can be batched together with static batching. this works even without lightmaps
     
  5. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    But unity would NOT batch objects if I dont check the "static" checkbox (even if they are using the same material)?
     
  6. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,450
  7. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    URP also has the SRP Batcher which works completely differently than Unity’s static or dynamic batching.

    Static batching (which can be enabled separately from lightmapping, that check box is actually a drop down of several options) is only useful if you have a large number of meshes using the exact same material. If your scene is already setup with a limited number of materials and meshes that don’t need to move, static batching is indeed going to be the faster option.

    Otherwise the SRP Batcher is designed to handle a lot of separate materials and meshes in an efficient way, as long as the material values don’t need to change.

    I did an overview of the different options here:
    https://forum.unity.com/threads/srp-batcher-and-gpu-instancing.833362/#post-5521216
     
    Lars-Steenhoff likes this.
  8. AlexTorbin

    AlexTorbin

    Joined:
    Dec 12, 2019
    Posts:
    48
    Very useful indeed! Has the situation cleared up with this?

    I tried to instantiate/redye materials on multiple objects on every frame, frame debugger still shows a single SRP batch.