Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug SRP batcher does not work with OpenGLES3

Discussion in 'Universal Render Pipeline' started by drallcom3, Apr 19, 2021.

  1. xiaoyutou1988

    xiaoyutou1988

    Joined:
    Mar 16, 2017
    Posts:
    4
    URP 10.5.1
    Unity:2020.3.14f1
     
    Last edited: Jul 15, 2021
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,062
    Well, as I said earlier, you need URP 10.6.0 :)
     
  3. xiaoyutou1988

    xiaoyutou1988

    Joined:
    Mar 16, 2017
    Posts:
    4
    Oh, I see, Thank you so much
    I lose some important informations from you,hhh:D
     
    aleksandrk likes this.
  4. BloopTrangle

    BloopTrangle

    Joined:
    Jun 4, 2018
    Posts:
    2
    Updated Unity and URP package then built for Oculus Quest. Some SRP batches show up in the frame debugger for Lit and other shaders, but Baked Lit and some others are not SRP batching. All the URP shaders SRP batch in the editor, but in builds the majority are still not being batched. Is there something I'm missing?
     
  5. prawn-star

    prawn-star

    Joined:
    Nov 21, 2012
    Posts:
    79
    Well when I search the forums for "Quest SRP" guess what thread pops up first
    If there is an answer to the question why does SRP run at an extremely low frame rate on the Quest then please point me to it. I have been unable to find ANY solution to this question
     
  6. Buzzrick_Runaway

    Buzzrick_Runaway

    Joined:
    Jan 7, 2018
    Posts:
    18
    Hi team.
    I'm just reading through this forum post trying to understand if this issue is the same as what I am observing in our project. I assume when you say that the SRP batcher doesn't work, basically it doesn't render anything and you're left with a blank screen, is that correct?

    This sounds like it's exactly the same issue as we are having. I have another forum post explaining this, but the short version is that we're using Unity v2019.4.25f1, with OpenGLES3 on Android. We are using URP v7.3.1, and are unable to upgrade to anything above that version without it causing this blank screen rendering.

    This has been a problem for a long time, but it has become urgent this week because for some reason whenever I load the project it insists on automatically updating to URP v7.6.0 without any input! When I manually download it back to v7.6.0, it doesn't work.

    This is terrible timing because I'm less than a week away from our final build date, and I'm not able to make working builds.
     
  7. BloopTrangle

    BloopTrangle

    Joined:
    Jun 4, 2018
    Posts:
    2
    That's probably unrelated to this thread, sorry. We are having issues with batching, no visible rendering issues other than low framerate.
     
    Buzzrick_Runaway likes this.
  8. Buzzrick_Runaway

    Buzzrick_Runaway

    Joined:
    Jan 7, 2018
    Posts:
    18
  9. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,062
    This sounds like a different issue to me.

    Try searching for "srp batcher performance" next time :)

    Short version is that SRP batcher doesn't necessarily mean your app will perform better. It may decrease performance - it all depends on the content and devices you use.

    I suggest to file a bug report so that relevant people look at it and check if something can be improved.
     
  10. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    Hi, I upgraded from 2020.3.13 to 2020.3.14 and also updated the URP from 10.5 to 10.6 and get a load of errors.

    Any suggestions ? Thank you. error.png
     
  11. molegame

    molegame

    Joined:
    Feb 27, 2020
    Posts:
    2
    Hi, i found that shader's SRP Batcher compatible state was different on GLES3 and Vulkan.

    On Gles3,it says "UnityPerMaterial var is not declared in shader property section (xxxxxxx)".
    On Vulkan,it compatible

    2020.3.14+URP10.6
     
  12. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    Just wanted to share that 2021.1.15f1 solved the issue for me. Thanks!
     
    aleksandrk likes this.
  13. lagalot123

    lagalot123

    Joined:
    Nov 12, 2015
    Posts:
    12
    Still not working for us on 2021.1.15f1 using URP 11.0.0 and the default URP project scene.
    Using OpenGL there's only "Draw Mesh" events and no "SRP Batch" event in the frame debugger.
    If we switch to Vulkan the SRP batcher seems to work and the frame debugger only shows "SRP Batch" events.
     
  14. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
  15. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,062
    Please make sure to update to 2021.1.16f1.
     
  16. lagalot123

    lagalot123

    Joined:
    Nov 12, 2015
    Posts:
    12
    Any ETA for that version?
     
  17. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    I am on 2020.3.14 and URP 10.6. These are the good versions correct ?

    As you mention above, regarding OpenGL ES 3.1. that it should be compatible. Would it also work with OpenGL ES 3.0 devices, meaning the SRP batcher should be compatible with Android 4.3 (API level 18) as suggested by this website:

    https://developer.android.com/guide/topics/graphics/opengl


    My concern is to get the ETC2 compression compatibility as it is possible from OpenGL ES 3.0
     
  18. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,062
    Yes.
    SRP Batcher requires OpenGL ES 3.1 to work. Shaders will work on devices that run OpenGL ES 3.0, but SRP Batcher will be disabled.
     
    Brother_77 likes this.
  19. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,062
    It has just been published.
     
    lagalot123 likes this.
  20. Roy-Hu

    Roy-Hu

    Joined:
    Apr 13, 2021
    Posts:
    7
    I'm using unity 2020.3.15f1c1 + urp 10.6.0, the SRP Batching works well in Vulkan. But if the shader gets a little complicated, the batching will fail in OpenGL ES 3

    ---------------
    Weird, after restarting the pc and rebuilding the app, it works out correctly nowo_O
     
    Last edited: Aug 17, 2021
  21. WildMaN

    WildMaN

    Joined:
    Jan 24, 2013
    Posts:
    128
    @aleksandrk
    Got a similar issue, though with a bit different error:
    "A Hybrid Renderer V2 batch is using the shader "Universal Render Pipeline/Lit", but the shader is either not compatible with Hybrid Renderer V2, is missing the DOTS_INSTANCING_ON variant, or there is a problem with the DOTS_INSTANCING_ON variant."

    2020.3.23 / URP 10.7.0 / Hybrid Renderer v2
    Default URP shaders/materials. SRP Batcher is on.

    Symptoms are pretty much the same as in this thread: works in Vulkan, fails with OpenGL 3.2 both in editor and on actual device. Though my issue is specific to entities and HybridRenderer v2. Maybe the fix you've pushed didn't make it into DOTS_INSTANCING_ON for OpenGL variant? Or it is by design and HRv2 is not intended to support OpenGL yet?

    Case 1391439, just in case.
     
  22. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,062
    By design, no OpenGL support for HRV2, and I don't know if it's planned or not.
     
  23. matjumon

    matjumon

    Joined:
    Mar 20, 2019
    Posts:
    15
    I encountered a similar issue on URP 12.1.7/Unity 2021.3.4f1 where after deploying our project to Quest 2 the SRP Batcher is mostly not working. I say "mostly" because RenderDoc shows that Unity's default URP Lit shader is getting SRP Batched but no other shader is (despite being labelled as SRP Batcher compatible and successfully batching in-editor according to the frame debugger).

    Looking at the thread I see you mention SRP Batcher being only available on Open GLES 3.1 or higher, so I ticked off the box to require Open GLES 3.1 to no avail. Is there a way to get custom shaders to SRP Batch on Quest 2? And if there is, can you point me to the relevant documentation? Because searching on Google yields little more than this thread and other similar discussions. :/
     
  24. Deleted User

    Deleted User

    Guest

    I'm facing a similar problem with Unity 2021.3.5f1 using Omnishade, this shader inspector shows that this shader is compatible with SRP Batcher. Testing on editor the SRP Batcher works well, but when I build and test on Android device the SRP Batcher don't work. If I change the shader to Unity URP Lit the SRP Batch works on Android device too.

    My Android device is a Xiaomi Redmi Note 8 Pro with Android 10.
     
  25. Deleted User

    Deleted User

    Guest

    I tested the same case on unity 2021.3.15f1 and the problem occurs. But on unity 2022.1.23f1 the SRP Batcher works with omnishade.
     
  26. hulantstudio

    hulantstudio

    Joined:
    Jan 28, 2022
    Posts:
    3
    it's not working on 2021.3.5f1. use opengles32, bakedlit shader is not srp batch on mobile.