Search Unity

URP post processing = fps drop (low and mid-end mobile devices)

Discussion in 'Universal Render Pipeline' started by markut_NG, Apr 20, 2021.

  1. markut_NG

    markut_NG

    Joined:
    Mar 10, 2014
    Posts:
    3
    Hi, I'm working on a mobile game project in which we'd like to use post processing (URP).
    The problem is, once we activate post processing on Camera the FPS drop immediately (even when no post processing is active) on 10-15. This happens on low and mid-end mobile devices.
    We wanted to use "mobile-friendly" effects but everything turned out to be very heavy.
    Does anyone have any advice how to solve this performance issue?
    Thank you in advance.
     
  2. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    Sadly the only solution is to not activate post processing in URP and use a pack from the asset store.
     
  3. markut_NG

    markut_NG

    Joined:
    Mar 10, 2014
    Posts:
    3
  4. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    markut_NG likes this.
  5. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    I tried https://assetstore.unity.com/packag...g-color-correction-lut-blur-bloom-urp--129638 today and with LUT + bloom + vignette my FPS stayed at 60. If it costs performance it's A LOT LESS than the default URP stuff. With the default effects I got like 35-38 FPS (even when no effects were used und PP was enabled).
    Looks like it's good enough.

    Edit: Did some deeper testing with that asset. LUT is quite heavy, but the other effects are almost free.
     
    Last edited: Apr 21, 2021
    MaxAtEclipse, LilGames and markut_NG like this.
  6. markut_NG

    markut_NG

    Joined:
    Mar 10, 2014
    Posts:
    3
    Perfect! Thank you a lot! We tried to overcome URP post processing with the using of shaders (combination of plane + shader + glossiness map). That's what we're testing right now.
    But we'll try your advice too.
    Thanks again for a big help!
     
  7. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    New devices have no problem with post processing wven low-end devices with OpenGL ES3.2+
    What are the names of your test devices?
    It is still impossible to use real-time light on mobile phones, even for the best devices
     
  8. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    That is not how you design mobile games.
     
  9. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Please explain more I didn't understand what you mean
     
  10. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    You can't just assume everyone has a modern strong phone. The visual quality has to be somewhat consistent across devices and more or less match the store screenshots. Otherwise you'll get bombarded with bad reviews and your game review score tanks. URP PP is notoriously bad (even if it looks good). If I can get a similar visual quality by using something else and therefore making my game more successful then yes please.
    Also I'm using several realtime (vertex without shadows) lights on mobile and they eat less performance than URP PP.
     
    LilGames likes this.
  11. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Unfortunately, Unity has seemingly designed URP's post-processing in a bubble where they could 'never imagine' that people would want to run 100% custom post-processing.

    When you tick "Use Post-Processing" on the camera, Unity will always run its own final 'uber-pass', even if you're running your own custom post-processing and want to handle it yourself. Unfortunately, this comes with a fixed performance cost and can be felt on mobile, since it's still a fullscreen pass with samples (that do nothing).

    There is also known issues, ie: https://forum.unity.com/threads/cus...effect-causes-black-screen-on-android.861835/ - meaning that in essence, unless you're willing to roll the dice when you ship, you pretty much need to stick to Unity's (slow, but more importantly, poorly documented performance-wise) inbuilt post-pro.

    As for the broader question of what PostFX mobile can run - they can do a lot. Even something like an FXAA can still work on modern phones if it's designed with them in mind, here's one I develop + vignette running rock solid:


    But the thing you've got to be very careful of is base resolution. Try and render simple, optimised effects on some crazy DPI screen without properly accounting for it, and you'll run into trouble.
     
  12. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    If I don't tick it, Unity won't use it?
     
  13. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    If you don't tick it, no post-processing will work :) So you're always forced to pay the performance penalty, even if you don't use a single Unity PostPro effect.
     
  14. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    How to decide on the base resolution ? or even set it ? I apologise if it is a stupid question.

    :D
     
    Uzair-Mahmood likes this.
  15. Shaggy21

    Shaggy21

    Joined:
    Oct 2, 2014
    Posts:
    24
    Did they improve it by now? Or is there something in the works for a more mobile friendly performance pipeline?
     
  16. eikenuro

    eikenuro

    Joined:
    Jul 3, 2020
    Posts:
    1
    I hope for a mobile optimization too. Using the URP Post Processing causes me to lose about 30 fps on my smartphone. With only bloom & vignette enabled. That's insane.
     
  17. Shaggy21

    Shaggy21

    Joined:
    Oct 2, 2014
    Posts:
    24
    I tried reducing every quality property I could find, and I think lowering the render resolution to 0.5 helped me reach decent performance and FPS. The question is, can your game settle on this quality impact
     
    MaxAtEclipse and eikenuro like this.
  18. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,362
    URP is definitely years away from matching the standard pipeline in performance, i see it every day in all my asset work.

    I would also say that HDRP is not for making games at all, unless target some super computer.

    There is absolutely zero point to either URP or HDRP when can do the same or more with Standard and vastly more efficiently.
     
    eikenuro likes this.
  19. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    For me setting Fixed DPI (Project settings - Player) from max 480 to 360 was the solution, greatly improves performance and I read somewhere it is an ancient approach that still holds true, there is difference in quality but it is worth it.

    Recommend this post :

    https://forum.unity.com/threads/tar...ng-fixed-dpi-factor-vs-setresolution.1076789/

    or

    https://canopy.procedural-worlds.co...ncrease-your-games-framerate-in-unity-3d-r28/

    https://gamedev.stackexchange.com/q...is-not-equal-to-the-screens-height-in-real-li
     
    Last edited: Aug 23, 2022
    Shaggy21 and eikenuro like this.
  20. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    326
    This is all getting a bit ridiculous and Unity seem to have nothing to say on it.
     
    Shaggy21 and eikenuro like this.
  21. FrenchToastFella

    FrenchToastFella

    Joined:
    Dec 9, 2013
    Posts:
    7
    Honestly, I feel like URP is designed just to make artists' life easier, but there's obviously a massive impact on performance. If you don't trust me, just ask any URP graph to show you the compiled code. Hell, just place a new "multiply" node in the graph and right click on it - see generated code and judge for yourself. It's a nice concept, but far from optimal.
     
  22. goldenbeerus

    goldenbeerus

    Joined:
    Nov 28, 2017
    Posts:
    5
    Has any one figured out alternative ways to use glow effect in URP cause Post Processing with bloom alone tanks the performance a whole lot which feels weird
     
  23. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    Kronnect likes this.