Search Unity

LWRP bad performance on mobile.

Discussion in 'General Graphics' started by SiriusT987, Jan 23, 2019.

  1. SiriusT987

    SiriusT987

    Joined:
    Feb 28, 2017
    Posts:
    67
    I want to make a mobile racing game and since the high end phones have pretty similar performance to a slighly older iGPU, I thought that using shadowmask would be nice to have those realistic shadows.LWRP doesn't have that option yet. I didn't want to switch to Built-in, because of the new Shadergraf and Visual effects graf.

    Yesterday I wanted to test just jow much faster LWRP is, but to my surprise it was ~25% slower on the same scene. I was getting 40 on Built-in and 30FPS on LWRP on a simple test scene and in the editor on a HD530 I got like 85 vs 60FPS. I saw that others had the same issue too, so it's not just me.
    Also the Post processing stack with Color Grading, Vignette and Bloom cuts the FPS in half on mobile.

    I didn't test it without shadows yet or with unlit shaders to figure out what causes the problem, but I find this really weird.
     
    Shorely likes this.
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    What shaders did you use for built-in and what shaders did you use for LWRP? On which device did you test?
     
  3. SiriusT987

    SiriusT987

    Joined:
    Feb 28, 2017
    Posts:
    67
    I have no idea what happened, now it works as it should, despite the fact that I didn't do anything to it. It must have some kind of bug I guess.
     
  4. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    I made an empty scene in lwrp mode and run it on samsung j5. it show 40fps. I made the same empty scene with built-in rendering pipeline and it run at 60fps. I use the official release of Unity 2019.1. I use Opengl Es 3 as graphic API. Why lwrp has poor performance?!
     
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    @alirezaitpro I suppose this depends on the configuration you have. Are you using default settings for both built-in and LW? Can you post the screenshots of the settings here?
     
  6. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    Please download my complete project. This is an empty scene made with Unity 2019.1 LWRP. also an apk file for android included. Test it on Samsung J5 2016. I get 45 FPS.
    https://www.dropbox.com/s/yh0fkof00i130j0/lwrp empty.7z?dl=0
     
  7. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
  8. MonkeyPuzzle

    MonkeyPuzzle

    Joined:
    Jan 17, 2016
    Posts:
    119
  9. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    No. LWRP is very unstable and unpredictable. On different Android phone has different behavior. It is not ready to use in production. I don't know why Unity released it as production ready solution. They should test it on low end and mid range android phones from Samsung and Huawei. The goal of LWRP is to develop games for low performance mobile phones and should be tested with low end Android phones before releasing it.
     
    Opeth001 likes this.
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    this is not what I asked for. You can submit a bug report if it's easier for you that posting a couple of screenshots.
    This is not what we see when testing it. Can you please elaborate?
     
  11. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    shot1.png shot2.png shot3.png shot4.png
     
  12. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    Last edited: Apr 25, 2019
  13. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Thanks a lot!

    I will double-check if LW is actually doing something extra when shadows are disabled. My guess is that the skybox settings are somehow different between LW and built-in.
    Can you try and set the camera to use "clear color" instead of a skybox and check the performance?

    The reason for J5 being slower than the LG one is that it has nearly the same GPU as the LG device you tested on, but the screen resolution is much higher.
     
  14. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    I changed the camera background type to Solid Color and it now runs at 60 fps! So something is wrong with skybox rendering!
    I just used default Unity skybox before.
     
  15. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    May I ask you to report a bug with "Rendering a scene with only a skybox in LWRP gives much lower FPS on Samsung J5 than the built-in pipeline" so that we can investiagte this?
     
  16. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    I did it.
    The problem may be skybox shader. In LWRP mode there is not a skybox shader under "Lightweight Rendering Pipeline" menu when creating a material for it.
     
  17. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Thanks!
    We'll figure it out :)
     
  18. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    Did you find any solution for it?
     
  19. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Can you post the issue number here?
    I'm not sure if it has been processed by QA or not, as I haven't seen this bug report yet.
     
  20. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    Case 1149049
     
  21. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    It looks like the QA couldn't reproduce your issue on a device they have.
    If you can provide any additional information to them, like Android version that's installed on your devices, this may help.
     
  22. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    I provided all information to them by email. Here I shared my project and the apk file of my test project but they don't care.They didn't respond to my email. Do you get 60 FPS by running my apk file? Did you test it ever? Could you give me your apk file to test it on my phone? It seems no body care about this issue.
     
  23. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    All I see in the issue tracker is that they couldn't reproduce this on a Samsung Galaxy J5, and informaed you about that.
    They asked you to provide additional information,you provided some additional info.
    I just clarified, what kind of additional information can be useful in this case in addition to what you provided already.

    When they look at you case again, they will try to reproduce this once more. I can't say, when this will happen, but if it doesn't heppen in a week from now, please drop a line here.
     
  24. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    I got an email from customer QA team:

    Hi,
    We successfully reproduced this issue and have sent it for resolution with our developers.

    We highly appreciate your contribution. If you have further questions, feel free to contact us.
     
  25. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Yes, they managed to reproduce the problem a couple of hours after I wrote here :)
     
  26. travelhawk

    travelhawk

    Joined:
    Jan 13, 2017
    Posts:
    22
    Is the issue already resolved?
     
  27. alirezaitpro

    alirezaitpro

    Joined:
    May 25, 2016
    Posts:
    18
    No, There is no response from Unity developers!
     
  28. Axspeo

    Axspeo

    Joined:
    May 24, 2019
    Posts:
    15
    Would like to know if this issue is resolved
     
    URoutine and themeshpotato like this.
  29. tuomashuhtanen

    tuomashuhtanen

    Joined:
    Jun 12, 2015
    Posts:
    1
    Hi,

    May I ask what’s the status of this one?
     
  30. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Is this issue resolved? A simple yes or no would be good, given how long its been and how many people are asking. @aleksandrk
     
  31. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    I just checked, the ticket says it was resolved in LWRP 6.5.2
     
  32. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Okay great thanks for the reply @aleksandrk , altho it appears URP now has some bad performance across the board (on empty scenes and stuff ,theres a number of threads around here about them). I had thought LWRP would be usable in production by now but you guys changed it to URP, and as a result it seems to be back at alpha in terms of usability, stability and performance despite being touted as a "name change". :(
     
  33. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Anything related to bad performance on LW or Universal should be reported as bugs :)
     
  34. gosolo2

    gosolo2

    Joined:
    Feb 17, 2013
    Posts:
    6
    I tried LWRP and the performance has a lot to be desire. Few issues with VR. I don't think LWRP should be released just yet. I guess the folks from UNITY made a big fuss about the LWRP but they should have LWRP 100% bullet prove before release it to the community.
     
  35. DantaliaN

    DantaliaN

    Joined:
    Oct 7, 2012
    Posts:
    18
    same issue on low-tier mobile devices.
    I got almost 50% drop fps when switch to lwrp with simple empty scene with no additional effects, shaders etc.
    Unity must show common mobile settings to use for lwrp with no performance drop
     
  36. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    I would like to follow this up, I built an empty (only with one camera) URP 2D scene on to a Samsung A12 device from an empty project, with lowest quality settings and it still only give me 20 FPS. Is this a bug?

    I am using Unity 2020.3
     
  37. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    @Gamrek what's the performance like if you do the same without URP?
     
  38. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    It still stick with 20FPS.

    If I use Application.targetFrameRate = 60 at start function in an empty scene with one camera (URP). It can go up to 30 FPS

    signal-2021-05-17-112418.jpeg
     
  39. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Well, I don't think it's a bug in this case :)
     
  40. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Does it mean the the max. FPS that this device can achieve is only 30FPS? Is it possible that other games on the same device can achieve up to 60FPS? Can you explain more, please?
     
  41. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    No, that's unlikely. There's probably some other setting that's limiting the FPS.
    But it won't be treated as a bug in URP because it's the same performance with builtin.
     
  42. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    thanks, do you mean other settings on the Unity project? Or settings on the android device itself?

    I have also deployed the same project on Samsung A40, which that achieves 60FPS.

    this is driving me crazy, do you have any suggestion on where I can find a solution to this? Thanks!
     
  43. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    I found my own answer, I disable VSync Count off as I would need to set "Every V Blank"...
     
  44. rjonaitis

    rjonaitis

    Unity Technologies

    Joined:
    Jan 5, 2017
    Posts:
    115
    Hi, it appears that "Optimized frame pacing" is the cause of this problem on this particular GPU GE8320. Disable it in the player settings and you should be able to get 60fps with empty scene.