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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 5.3 - Super lag on particles on mobile platform

Discussion in 'Editor & General Support' started by rend-master, Dec 8, 2015.

  1. rend-master

    rend-master

    Joined:
    Sep 22, 2015
    Posts:
    11
    Using mobile additive particle shader now became laggy on mobile, it wasn't lagging on Unity 5.2.2.
    Still trying to tweak so it won't lag.


    Can anyone help me with this?


    Thanks
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,851
    What does the profiler say, how does it compare to 5.2.2? Has something changed?
     
  3. rend-master

    rend-master

    Joined:
    Sep 22, 2015
    Posts:
    11
    Hi, Karl!!
    I'm sorry, it wasn't related to the particles, I kinda posted in a hurry.

    Profiler difference attached.

    The scene description is: one animated character and 6 non-animated objects, including a big floor.

    On Unity 5.2.2, the character can walk everywhere and it won't lag, whereas in Unity 5.3.3 if I get near 5 non-animated objects, it will start lagging.

    I can't state something for sure by looking on the profilers because I can only see the lag when testing the game on the mobile phone, which is android. And the game is all tweaked for performance.

    Something different I noticed on the profiler, though, was that in Unity 5.3 the forward opaque renderer is different, making 99 calls on the scene I'm testing, wheres the Unity 5.2.2 makes 74 calls.

    But, as I said, it's not so obvious to me since it's a different environment on the mobile phone.
     

    Attached Files:

  4. rend-master

    rend-master

    Joined:
    Sep 22, 2015
    Posts:
    11
    For each object I see on the scene, and for each material of those objects, Unity 5.3 Forward Renderer will call Material.SetPassFast. If I some of them are not visible, then it will not call. But it lags too much when those are visible.

    I believe the lag is related to this, I can't think of anything else.

    Since it sounds like a big change and the fact that I would love to use the multi scene editing, I will try tweaking a little more. I will post here if I have any progress.


    Thanks