Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Better performance on stock rendering pipe then LWRP? Android

Discussion in 'Graphics Experimental Previews' started by Immortalis94, Jun 19, 2018.

  1. Immortalis94

    Immortalis94

    Joined:
    Feb 22, 2017
    Posts:
    11
    I switched to using LWRP a few days ago, and game is now running at 60FPS for about 1-2mins and then it starts dropping the frame rate cause of thermal throttling. I had this problem before but i used Beautify bloom PP so when i turned it off i stop getting this overheat but with LWRP without any PP i am getting worse performance than before... How is that possible =.=. Testing on my Galaxy 8+ SM-G955F and these settings for LWRP with 2 Pixel lights and HDR enabled other things r disabled, rendering is set to 1 cause i am already scaling it down via script in the beginning to max res 1080p. I am using 1 directional light, Lightweight PBR shader and no shadows. Should i tweak something else and is there anyone with the same problem? :)

    EDIT: I have V-Sync set to every v blank cause without it fps is blocked on 30, i thought to overcome this thermal throttling by limiting fps to 30 but still i am better going with standard pipeline and beautify over LWRP and new processing stack where i get max 50 FPS using bloom only with Fast enabled :( it says that it is optimized for mobile
     
    Last edited: Jun 19, 2018
  2. nepoez

    nepoez

    Joined:
    Sep 11, 2011
    Posts:
    298
    I have the same experience on 2018.1.6, the default is 5x faster on a low end device.
     
    grobonom and kukamed like this.
  3. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    98
    W
    Will default pbr shader work well on newer Android device like 4gb ram + adreno 506?
     
  4. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    98
    Is beautify works great for mobile ?
     
  5. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    161
    Hi,
    It would be great to get the scene/project off you to see what is going on here, in our tests here on an even playing field the LWRP runs much faster on the majority of devices/platforms.
     
    ROBYER1 likes this.
  6. Torigas

    Torigas

    Joined:
    Jan 1, 2014
    Posts:
    63
    I noticed something similar and decided to upload an example project with apks:
    https://1drv.ms/u/s!Ajlnu9a5i2Xz3SXMNlD-ryZLLVm5

    I get 60 FPS on old default rendering ( no SRP asset set in graphics settings. All materials in the scene set to "Standard").
    With the LQLWRP asset and the materials set to LWRP shaders its at about 34 FPS.
    No posteffects.
    Currently, I'm testing on a Xiaomi Mi A2 lite - Similar behavior on a Doogee Mix 2.
    Did I miss some essential step when enabling LWRP?
     
    dnnkeeper and LeGiangAnh like this.
  7. dnnkeeper

    dnnkeeper

    Joined:
    Jul 7, 2013
    Posts:
    65
    Getting same result on Galaxy Note 5: 29-32fps vs 60fps.
     
  8. LeGiangAnh

    LeGiangAnh

    Joined:
    Nov 10, 2013
    Posts:
    113
    In my case, the FPS is almost 50% compared with Mobile shaders right after converted. But we go to far and we cannot convert back.
    Now we need to wait for the LWRP to be more stable and has better performance.
     
  9. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    In my case, the game look significantly worse with almost no Post process,
    and I lose about 20-30% of FPS on PC/Consoles
     
  10. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    161
    Hey All,

    We are concerned about all of this information and are working hard to address known performance bottle necks, but we need more information from everyone before we can fully start to address these issues you are running into.

    At the bare minimum we need to know what version of Unity and LWRP you are using, Platform/API and preferably the device(down to model number as many mobile devices can have different GPUs in different countries). If you want us to really fix the issue as fast as we can we need a scene/reproduction project that shows the issue and filled out into a bug report so we can do internal debugging and see where the exact slow downs are.

    Finally, if you are working on a project that you intent to ship at some point then you must stay up-to-date with the latest LWRP and Unity, since we are only going out of experimental in 19.1 this means that older versions will most likely not be getting the same updates as the 19.1 LWRP version, only critical bug fixes are going to be going back and only until 19.1 beta is released.
    We are constantly improving and updating the feature and only in the last month have we started our bug fix and performance run since up until this point has been adding critical features and API lockdown.

    We really want to make sure LWRP is fast and easy to use and if you are hitting bottle necks, especially ones that seem unfair then we need to iron them out :)

    For those who are not sure how to report an official bug, check here https://unity3d.com/unity/qa/bug-reporting

    And we recently(last week) managed to get rid of a lot of unnecessary memory bandwidth for rending a single frame, this has made some of our internal test projects double in speed so hopefully we can get this change tested and sent out into a package for everyone to try.
     
  11. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    For us:

    EditorVersion: 2018.3.0b12,
    render-pipelines.core: 4.3.0-preview,
    render-pipelines.lightweight: 4.3.0-preview,

    Tested on PC/Switch/PS4, all of these platforms show significant drop in performances and graphics
     
  12. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    161
    Is this between Builtin > LWRP or LWRP > LWRP 4.3.0-preview?

    If coming from builtin what were your projects rendering in before? deferred or forward rendering?
    If coming from an earlier version of LWRP what version did you update from?

    what is a general scene in your project made up of? what lighting, how many objects, what type of post processing etc.
     
  13. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    - BuiltIn Deferred > LWRP 4.3.
    - we use the Unity Post processing 2

    we have lots of lights.
     
  14. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,203
    Probably because you have a lot of lights you will need to wait for deferred LWRP in 2019 to get better results
     
  15. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    Yeah but light is supposed to be capped to 1 directional +4 others in LWRP no?
     
  16. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    161
    Yes but this will be partially why you have visual loss. After looking at your videos you PM'd me I can see a few things that stand out.

    -You rely a lot on AO for lighting, currently LWRP has no AO support, so this is severely hurting the visuals and we know it's a pain point, we are looking at maybe adding support for the current one even though it relies on compute shaders.
    -You are using shadowing quite a bit and currently LWRP only supports shadows on the main directional light and additional spotlights, this is planned for later and should be in early next year.
    -You are missing shadows al together in LWRP, this might be due to pipeline asset setup, material setup or something has gone weird in the upgrading.

    If you could possibly create a very small scene that you are allowed to share with me I can take a look and see if there is anything that stands out. Also it's very weird that performance has dropped so much, considering LWRP will be not rendering anywhere near the same amount of lights.
     
  17. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    385
    Hi all,

    We will threat cases that LWRP is performing worse than Built-in as bugs. So please if you have converted your game and is experiencing worse performance submit it as a bug. We will truly appreciate it.
     
    afshinunity likes this.
  18. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    You mean LWRP performing worse than Built-in, right?
     
    phil_lira likes this.
  19. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    385
    Yes. Fixed :D
     
  20. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    yes for inside, it's mainly AO and most of the time shadows are disabled

    Shadows where disabled, cause with shadows it's -5fps

    yeah that's why I'm really surprised!
    It will be very hard to extract a small scene, project is 30gigs

    Maybe one of the reason could come from the shaders, in Build-in we have custom shaders handwritten, with LWRP we ported our shaders to Amplify Shaders Editor




    Completely unrelated, but I've done that tool to quickly change all materials
     
  21. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    161
    Out of interest can you quickly test with just a blanket conversion to one of the LWRP shaders? I can't imagine Amplify shaders being that slow.

    Nice tool!
     
  22. eXiin

    eXiin

    Joined:
    Dec 23, 2013
    Posts:
    63
    Right now I can't, as our tests where very inconclusive we decided to put that in pause and move it in a separate branch.
    Once I've finish my current task, I can go back to it.
     
  23. MrMetwurst2

    MrMetwurst2

    Joined:
    Jul 16, 2009
    Posts:
    245
    I have just upgraded my project to 2018.3.0f2 and LWRP 4.6.0
    Currently building for Android.
    I made my own light weight Glass Shader in Shader Graph using a simple Opaque Texture process.

    I'll go through the process of reverting to standard shaders again to test this as I think LWRP is hurting my FPS as well.
    Day Scene has 1 Pixel light with shadows.
    Night scene has no Pixel Lights but 6 Vector lights with no shadows.

    Unfortunately I suck at traditional Shader Programming so not sure how best to convert my Glass over. I might try using MK Glass Free.

    I'll post some mobile results soon.

    Here's how my current test scenes look in the editor using LWRP (Obviously FPS on mobile are much worse :) ) ...

    upload_2018-12-18_13-26-30.png
    upload_2018-12-18_13-27-54.png
     
    Last edited: Dec 18, 2018
  24. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    385
    I'm investigating some extra bandwidth cost on LWRP when using MSAA. Could you guys check if disabling MSAA fix your performance issue?

    Also, another source of performance problems is that quality controls for Builtin and LWRP are separate. in that case it's worth double checking what you have in LWRP that might be different from builtin.

    1) Amount of lights
    2) Shadow settings
    3) Msaa

    just to name a few.

    We are also focusing on performance + QA on lwrp for getting out of preview. If you share your project we will gadly take a look at them.
     
    ROBYER1 likes this.
  25. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    217
    Hi @phil_lira,

    I just filed a bug report for a very similar problem with the LWRP on Android involving shadows. I created a very simple scene: an object using the simple lit shader (alpha clipping activated) casts a shadow on a single plane using a single directional light with soft shadows (shadow resolution: 1024). On a Galaxy S6 (SM-G920F) this scene leads to significant device heating and battery drainage. The same scene using the legacy renderer and legacy (cutout) shaders leads to less heating (with 'very high' shadow resolution). By comparison, on a Pixel XL (1st gen) I don't get significant heating using the LWRP.

    Will post #issue id once it's sent to me. Cheers /Wendi


    upload_2019-3-29_12-45-49.png
     
  26. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    217
    Bug report is here.
     
  27. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    130
    My guess is that you are using higher quality shadows with LWRP vs the default pipeline.
     
  28. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    217
    Sorry, but the only way I can make sense of your remark is by assuming you didn't read my post. As I said, the problem is specific to a certain device (S6) using a LWRP build vs default. Performance is not selectively impacted on another device (Pixel).
     
  29. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    130
    It could be that the impact of the soft shadows is insignificant on the pixel or that the pixel has a better GPU architecture for the task than the S6 (i.e. maybe tiled vs non-tiled), so it may only be measurable on the S6.
    What sort of frame rates are you getting? Is VSync enabled?
     
  30. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    116
    yes ! much slower !

    on an android mid-end device, the stardard runs at 24fps and the LX runs at 17fps.

    It's and fps walk in Carcassonne. if you wanna see the difference in real with your devices, i'll post both
    standard and LW APKs. just lemme know :)

    Therefore, for me the LW is a no-go for android.

    Happy Unitying !
     
    WendelinReich likes this.
  31. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    217
    Hi @grobonom, Unity say they treat all such cases (with less performance on LWRP) as bugs, so could you file a bug report instead of posting your APKs here?
     
  32. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    116
    hi @WendelinReich

    I'll try to file a bug but i know U3D devs will need my project and it's getting quite huge :/
    more than 2GB....

    I thought that as a first step i could send the 2 apk to give an idea of the differences.

    It will take ages to upload for my internet connection.

    But if it might help unity team, i will report my issue.

    Happy Unitying !
     
  33. nepoez

    nepoez

    Joined:
    Sep 11, 2011
    Posts:
    298
    Yup LWRP sucks. Don't think it was tested.
     
  34. hatless

    hatless

    Joined:
    Dec 15, 2010
    Posts:
    37
    Be less internet.
     
    Timurio, joshcamas, Srokaaa and 2 others like this.
  35. alexnown

    alexnown

    Joined:
    Oct 25, 2018
    Posts:
    20
    Hi folks,
    after updating my 2d platformer to unity 2019.1 and LightweightRP 5.7.2 i have performance issue only on an android devices. Final Blit Pass take around 80% all rendering time, so rendering performance is terrible. upload_2019-5-4_8-31-47.png

    Submitted the bug report (Case 1151611)
     
    Last edited: May 4, 2019
  36. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    116
    i suppose you disabled the 'wait vsync' option ?

    sometimes, udev team make weird choices :/ like dropping their awesome webplayer, for a useless 3D web api... quite strange but i guess it's a matter of market parts.....

    LWRP is amazing for windows and really runs faster !
    On android it appears there are still some issues.... just a matter of time IMHO :))

    Happy unitying ! :)
     
    Last edited: May 11, 2019
    Enzi likes this.
  37. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    385
    Hi Alex. Which device are you seeing this?
     
  38. alexnown

    alexnown

    Joined:
    Oct 25, 2018
    Posts:
    20
    Meizu Pro 7 Plus and Nexus 7 2013. Mono and IL2CPP builds.
     
  39. Nerisma

    Nerisma

    Joined:
    May 11, 2015
    Posts:
    1
    I'm having the same FPS issues on my low end Android device using a MEIZU_M5 model M611H.

    The demo scene in the LWRP project template is running at 5~6fps on my device with post process and around 30 fps without post process..

    Switching back to default rendering until it's usable on low end devices. I'll stay around.
     
  40. grllle

    grllle

    Joined:
    May 4, 2015
    Posts:
    8
    Unity 2019.1.4f1

    LG K8 (2017)

    One mesh with ~65500 vertices

    mobile diffuse: 60fps+
    lwrp simple lit: 45fps
    standard shader: 30fps
    lwrp lit: 30fps

    I will file a bug report tomorrow...
     
  41. Athomield3D

    Athomield3D

    Joined:
    Aug 29, 2012
    Posts:
    173
    Unity 2019.1.0 lwrp has a very bad visual quality and is running very slowly...
     
  42. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    385
    Hi plea
    I've checked this case and it's caused because project settings are different between LWRP and Built-in. I've replied the case with the two shots and Built-in is way worse due to it disabling cascades, HDR and other settings.

    The heating and battery drainage comes from the fact that HDR and cascades will increase external memory reads/writes (bandwidth).

    The results vary by different GPUs because they will have different hardware power in terms of bandwidth, fragment processing and so on. So the bottleneck shifts.
     
  43. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    385
    About the performance issues some of you reported above. It's a mix of things.

    1) Some of them were regressions and we fixed them.

    2) Some other cases are because different quality settings on the project vs Built-in and LWRP. Built-in Pipeline has this Graphics Tier settings that by default disabled a bunch of features such as shadow cascades, HDR, and so on. While LWRP (or SRP for the matter) doesn't have a system like this. What you ask on the LWRP asset is what you get. So I've seen a lot of reported performance issues caused by this. Recently we put work on Unity engine side to allow to choose LWRP asset per quality settings/build so you can scale rendering and choose quality settings per platform/tier without having to switch assets at runtime yourself.

    3) The third aspect of it is that there's work being done in Built-in that affects optimization and that means that when comparing LWRP vs Builtin this few like a regression in performance. To spice a little bit things up, sometimes it's even a bug introduced in built-in that causes a feature to not work properly and as a side effect it increases performance. nice eh?

    I just also wanted to say a big thank you for all the users reporting performance bugs. We definitely encourage this but it's only helpful for us if you submit a bug report so we can look at it. So, please, if you have performance issues of LWRP vs Builtin submit a bug with project and we will give priority to it. Atm, I can't see any active user reported performance project, I've resolved all of the ones active recently. So if there's still open please link here and I'll look.
     
  44. Athomield3D

    Athomield3D

    Joined:
    Aug 29, 2012
    Posts:
    173
    1. Are we getting the improvement updates soon ? Im using LWRP 5.7 on Unity 2019.1
    2 . Is there a way to currently disable some of these features like cascaded shadows manually ?
    3 . noice
     
  45. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    130
    You can set shadow cascades to disabled. That saves a fair bit. It also means that you do not have to do a z prepass which isn't that useful on mobile unless you need Z for another effect.
    Without cascades, you will probably need to use a very limited shadow range.
    Soft shadows have a cost as well.
     
  46. blunzn

    blunzn

    Joined:
    Jan 14, 2015
    Posts:
    10
    I am having issues with the unnecessary FinalBlitPass too. This happens on mobile devices because
    Code (CSharp):
    1. bool platformNeedsToKillAlpha = Application.platform == RuntimePlatform.IPhonePlayer ||
    2.                 Application.platform == RuntimePlatform.Android ||
    3.                 Application.platform == RuntimePlatform.tvOS;
    4.             renderingData.killAlphaInFinalBlit = !Graphics.preserveFramebufferAlpha && platformNeedsToKillAlpha;
    killAlphaInFinalBlit is true on those devices by this part of code in LightweightRenderPipeline.cs, which leads to
    Code (CSharp):
    1. RequiresIntermediateColorTexture
    returning true in ForwardRenderer.cs, which leads to
    Code (CSharp):
    1. bool createColorTexture = RequiresIntermediateColorTexture(ref renderingData, cameraTargetDescriptor) || rendererFeatures.Count != 0;
    getting true, which leads to the FinalBlitPass. Also attaching any RendererFeature has the same effect.
    This is unfortunate, as its absolutely not necessary, and takes a huge amount of frameTime especially on older devices. The only way for me to prevent this is to force createColorTexture to false, but I can only achieve this by editing the package source code, which is no feasible solution (just for testing I did this, and everything runs fine and smooth, same performance as without LWRP).

    So please fix this (LWRP 6.9.1)!!
     
    Last edited: Aug 2, 2019
  47. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    130
    Unfortunately, we've had to modify the source code as well for the same reasons.
    Maintaining it will be a pain, but we hope that someone fixes it soon.
    There must be a better way to deal with RendererFeatures and the final blit that is more performant, even if that means less abstract.
     
  48. exzizt

    exzizt

    Joined:
    Sep 30, 2017
    Posts:
    65
    The LWRP's PixelPerfectCamera makes it so my UI elements such as buttons aren't clickable. If I disable the PixelPerfectCamera, I can click them (so I can confirm that it's this causing it). Using the previous PixelPerfectCamera from the Pixel Perfect package did NOT cause this problem.

    Any ideas?

    EDIT: It's an issue only when crop frame X or Y is set! It's very weird. It's like I have to click and take into account the position of the offset from X and Y. How to fix?
     
    Last edited: Aug 5, 2019
  49. Berthil

    Berthil

    Joined:
    Aug 26, 2013
    Posts:
    15
    Im trying to use LWRP for an Android game but i cant get more than 25 fps on a medium performance device ( Asus Zenfone 4 Max). I lowered everything i could regarding performance for testing. Even a blank new scene dont pass 20 FPS with LWRP default settings.
    Using stock rendering on my game i get 60 FPS.
    Should i forget about LWRP for a while and go back to stock?
    I would like to use a neon texture in some parts, which is easier to acquire with LWRP, but i cant get it on stock rendering without buying it on asset store ( unless im missing something or I coudnt find a good tutorial).
     
  50. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    130
    You are using LWRP for a neon texture?
    I am guessing that the shader is the missing part as textures are interchangeable.
    Chances are, you can modify the neon shader to work with the stock RP, copy the neon texture and create an appropriate material.
    Still, I wonder why your fps with LWP is so different. Are you using shadows? Do you have cascades on? In the stock RP cascades silently fail, in LWP they work but they are slow.