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

Feedback Is there anyone has success with LWRP SRP batching on andriod?

Discussion in 'Universal Render Pipeline' started by chrisli32, Aug 29, 2019.

?

Anyone has it working?

Poll closed Sep 26, 2019.
  1. Yep, working on my andriods

    0 vote(s)
    0.0%
  2. No, either broken or no effect

    100.0%
  1. chrisli32

    chrisli32

    Joined:
    Nov 18, 2013
    Posts:
    7
    I have tried 2018.4.6, 2019.1.14, 2019.2.2, with Samsung Galaxy S6, Google Nexus 6P, LG G4, and none of them work on Andriod. However, on IOS, it works flawlessly.

    According to the documents below:
    - https://docs.unity3d.com/Manual/SRPBatcher.html
    - https://blogs.unity3d.com/2019/02/28/srp-batcher-speed-up-your-rendering/

    It should be available for 2019.1 and/or 2019.2 for OpenGL ES 3.1 and higher, however, this is not the case from what I see.

    There are other similar post said that this has been fixed but not from what I see:
    - https://forum.unity.com/threads/lwrp-srp-batcher-not-work-on-mobile.676705/
    - https://forum.unity.com/threads/srp-batcher-issues-on-android-lwrp.696599/
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,844
    Hi! 2018.x doesn't have support for it.
    2019.2.5f1 will have a fix for mesh positions set to 0.
    Otherwise it should work.
     
  3. chrisli32

    chrisli32

    Joined:
    Nov 18, 2013
    Posts:
    7
    Hey aleksandrk.

    Thanks for your reply. So does that mean it should work in 2019.1 or currently it is not working in ANY version? I have tested it on multiple versions of unity and Andriod devices as mentioned above. My problem is not about positions set to 0, the problem is that it has no performance improvements (actually it worsen the performance when SRP batching is on) on andriod devices. I am quite sure my test scene set up is correct as it is working as intended on IOS devices.
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,844
    Yes, it should.
    Which graphics API did you use?

    BTW, this is quite different from your initial post:
     
  5. chrisli32

    chrisli32

    Joined:
    Nov 18, 2013
    Posts:
    7
    Ok, I will test out 2019.1 again and see if it actually works.

    Samsung Galaxy S6, Google Nexus 6P, LG G4, they should all be Open GL 3.1+ If I am correct?

    Sorry if you have misunderstood what I was trying to say. I am not a native English speaker.
    "None of them work" as in I have tried those versions of Unity and enabling SRP Batching, but there is no impact on improving the performance at all for the Andriod devices I mentioned. But it works fine on IOS.
     
  6. liiir1985

    liiir1985

    Joined:
    Jul 30, 2014
    Posts:
    147
  7. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,844
    Yes, but it depends on the player settings. Try going there and unchecking "Auto graphics API" - it will tell you, which graphics API is actually used.
    Turning the SRP Batcher on does not necessarily improve performance on Android. If you see that it's lower for your application, you can turn it off.

    @liiir1985 it's marked active, so no, it's not yet fixed.
     
  8. chrisli32

    chrisli32

    Joined:
    Nov 18, 2013
    Posts:
    7
    Vulkan and OpenGLES3

    Well, I created a test project specifically for testing this feature. And it works flawlessly on IOS. If you insist that the SRP Batcher for Andriod is working as intended, then I would say this is not production-ready for me.

    Thank you for your answers. I will turn off SRP Batching and stick to the old fashion way with dynamic and static batching.
     
  9. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,844
    @chrisli32 can you submit a bug report with your test project?
    We have a stress test for the SRP Batcher and it's faster on many devices when the batcher is turned on. It would be very nice to look at what's happening in your test.
    Thanks!
     
  10. xandelee

    xandelee

    Joined:
    Sep 12, 2013
    Posts:
    29
    Found out why my android game was lagging and giving me high vertex reading only on android but not on the editor, the srp batcher doesnt work on android (unity 2019.4)
     
  11. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    269
    It's does
    But not every shader is compatible with it
     
    xandelee likes this.
  12. xandelee

    xandelee

    Joined:
    Sep 12, 2013
    Posts:
    29
  13. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    269
    The stats window is messed up when using SRP Batcher, sometimes it's showing negative numbers
    There is script here on the forum that show SRP Batcher stats just look for it
     
  14. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    269
    And batching does not reduce vert count but draw calls
    You should read a bit more about that
     
  15. xandelee

    xandelee

    Joined:
    Sep 12, 2013
    Posts:
    29
    So the profiler is bugged when it comes to profile the srp because when i enable SRP the verts goes down and the draw calls goes up and when i disable it the draw calls comes down and the verts goes up.
    It's sad that simple square cubes and some planes takes up so much performance to be rendered on unity mobile but i guess it's just the way it is.
     
  16. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    269
    Yes you shouldn't rely on it
    Which device are you using for these test and is post processing enabled ?
    And why don't you test on real project ? Coz we have something which is in development right now and it's works pretty well I would say
     
  17. xandelee

    xandelee

    Joined:
    Sep 12, 2013
    Posts:
    29
    URP and every graphics on low without post processing and with downgrade in resolution, it seems that rendering too much square blocks gives too much vertices for the device to handle properly.

    Testing on an ~mid end android device motorola g4 plus octa core (antutu says that is faster than 51% of the smartphones they test) so is right in the middle, i'm not testing on the iphone because its fast and can run basically anything...
    I'm going to add more complex 3d models on top of that square blocks but i guess i'll follow up with the development and if it only runs right on high end devices it's the risk i'll have to take.
    Thanks for the help!
     
  18. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    269
    You're is weak seriously it's has Adreno 405 GPU
    How many triangles are you trying to render ?
    https://forum.unity.com/threads/per...ions-of-unity-post-processing-and-srp.786944/
    Look at this thread you will find some tests I've made for stressing LWRP and URP