Search Unity

A Hybrid Renderer V2 batch error message

Discussion in 'Graphics for ECS' started by meanmonkey, Dec 2, 2020.

  1. meanmonkey

    meanmonkey

    Joined:
    Nov 13, 2014
    Posts:
    148
    A Hybrid Renderer V2 batch is using a pass from the shader "Shader Graphs/MyShaderGraph", which is not SRP batcher compatible. Only SRP batcher compatible passes are supported with the Hybrid Renderer.

    Is there any way to debug this message ? I tried a lot of things but I keep getting this error for two of my shader graph shaders. I am also using hybrid instancing with material properties.

    The error seems to be somewhat inconsistent, e.g. after I change something in the shadergraph, the error may be gone for a few minutes or hours until it comes back (without changing anything in between).

    I have this problem since I updated from 2020.1 to 2020.2 beta

    Thank you
     
  2. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    284
    Not sure if it helps, but on my end this error pops up when I enable SSS in shader graph settings.

    Note that the error only seems to pop up when you're actually rendering the object (eg. viewing it in scene/game view).
     
    meanmonkey likes this.
  3. meanmonkey

    meanmonkey

    Joined:
    Nov 13, 2014
    Posts:
    148
    Thanks for your feedback, I am not using SSS at all....I think I have reduced the error to one shadergraph only now, and it only pops up on scene load / init now (before that the error wouldn't go away during a scene session). Maybe it is some weird loading order issue, I dunno, it's very hard to debug with that message....
     
  4. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    Do the inspector settings of the shader say it's SRP compatible?
     
    meanmonkey and apkdev like this.
  5. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    284
    Also make sure it's not this error, which seems to occasionally appear when shaders are still compiling o_O
     
    reeseschultz and meanmonkey like this.
  6. meanmonkey

    meanmonkey

    Joined:
    Nov 13, 2014
    Posts:
    148
    that's the weird part, sometimes it is, sometimes it isn't. I just change nothing really important in the shader (like moving around a node), save it, and the error may be gone for some time, no error, no srp incompatible message, nothing. Then it comes back just like that.

    I think I tried almost everything...deleted library folder, tried to exclude parts of the shader graph, excluded instanced values and material properties......and many more things.

    At this point I only can assume it's some kind of unity bug I can't do anything about it.
     
  7. meanmonkey

    meanmonkey

    Joined:
    Nov 13, 2014
    Posts:
    148

    Also what I can see is that the more often I start the scene, those errors in shadergraph inspector view accumulate over time (last time I looked at it, this error appeard like 7 times)
     
    reeseschultz likes this.
  8. meanmonkey

    meanmonkey

    Joined:
    Nov 13, 2014
    Posts:
    148
    this is the latest error........
     
  9. temps12

    temps12

    Joined:
    Nov 28, 2014
    Posts:
    41
    meanmonkey likes this.
  10. meanmonkey

    meanmonkey

    Joined:
    Nov 13, 2014
    Posts:
    148
    Nice coincidence, I changed the material type from translucent to standard for the two shaders which were affected by the problem yesterday, no more errors since then. It's not ideal for foliage and grass but I hope they will fix it soon.

    Thank you for confirming that!
     
    deus0 and temps12 like this.
  11. ryanslikesocool

    ryanslikesocool

    Joined:
    Jul 31, 2016
    Posts:
    49
    This is still an issue with SRP/Shader Graph/URP 11.0.0 and Hybrid Renderer 0.11.0-preview.42. The issue is marked as fixed in SRP 10.3, but SRP 10.3 arrived a month after SRP 11. Any way to know when this will be fixed in the latest version?
     
    reeseschultz likes this.
  12. LunaeSomnia

    LunaeSomnia

    Joined:
    Jan 18, 2021
    Posts:
    1
    My fix was disabling "GPU Instancing"
     
  13. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    I have also the same problem:
    A Hybrid Renderer V2 batch is using a pass from the shader "HDRP/Lit", which is not SRP batcher compatible. Only SRP batcher compatible passes are supported with the Hybrid Renderer.

    A Hybrid Renderer V2 batch is using the shader "NatureManufacture/HDRP/Foliage/Foliage", 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.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    Specially the NatureManufacture/HDRP/Foliage/Foliage Shader should work it's clearly marked as SRP Compatible

    but also like @meanmonkey I have 'cross': implicit trunction of vector type error

    Unity 2021.1.1f1
    Hybrid Renderer 0.11.0-preview.42
    HDRP 11.0.0
    URP 11.0.0
     
  14. DK_A5B

    DK_A5B

    Joined:
    Jan 21, 2016
    Posts:
    110
    @JediNizar, just to let you know, Unity just announced that the Entities package (which the Hybrid Renderer is dependent on) is not supported on any version of Unity 2021 (I see you're running 2021.1.1). You can see the related thread here.

    I stumbled into this thread because I'm in the process of downgrading from Unity 2021.2.0a10 / URP 12 to Unity 2020.3.3f1 (LTS) / URP 10.4 in order to deal with the incompatibility with the Unity 2021 path and the Entities package and I'm now seeing a bunch of these compatibility errors. I think mine are a result of the fact that my Shaders are URP/Unlit.

    Can someone confirm whether there is an issue using URP 10.4.0, Hybrid Renderer, and Unlit shaders?
     
  15. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    @DK_A5B Thank you for the clarification,
    I will try to downgrade unity back to 2020. will see ..... maybe also the lights will work in a combination with GPU Instancing, once I downgraded
     
  16. DK_A5B

    DK_A5B

    Joined:
    Jan 21, 2016
    Posts:
    110
    @JediNizar I will warn you, and I should've mentioned this in my initial reply, downgrading is not support by Unity (the Editor will display a popup warning you about this when you try to open a project in a lower version) and so you should absolutely make sure to backup your project before doing anything.

    After trying to "automatically" downgrade (via opening my project in a previous version) I'm experiencing all kinds of strange behavior. I suspect this is a result of the fact that downgrades aren't supported. Ultimately, for my project, I think it will probably be necessary to recreate my project by creating an empty new project in the target version (e.g., 2020.3.3) and then importing my code and recreating assets. Not such a big deal for source files, but it definitely more work to recreate assets like Prefabs.
     
  17. Before you do that, try to export everything out into a .unitypackage and import in the new project. (Select Assets folder or the relevant folders you want to export, right click, export package...)

    This way you may not need to recreate every prefab and stuff. Just make sure all the dependencies are in one package so the references are saved.
     
    Last edited by a moderator: Apr 14, 2021
    DK_A5B likes this.
  18. DK_A5B

    DK_A5B

    Joined:
    Jan 21, 2016
    Posts:
    110
    Thanks, good thought.
     
  19. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    130
    It was only happening for me on final build on android, when switching the Graphic API to Vulkan, it worked perfect, it tend out that they only support Vulkan
     
  20. goodnewsjimdotcom

    goodnewsjimdotcom

    Joined:
    May 24, 2017
    Posts:
    342
    I tried upgrading to Hybrid Renderer v2:

    Been using HDRP for about 9 months, no v1 errors

    A Hybrid Renderer V2 batch is using a pass from the shader "Legacy Shaders/Particles/Additive", which is not SRP batcher compatible. Only SRP batcher compatible passes are supported with the Hybrid Renderer.
    0x00007ff6863f8bdc (Unity) StackWalker::GetCurrentCallstack
    0x00007ff6863fffd9 (Unity) StackWalker::ShowCallstack
    0x00007ff68715cd9c (Unity) GetStacktrace
    0x00007ff687ba5e83 (Unity) DebugStringToFile
    0x00007ff6861a8b55 (Unity) LogRepeatingStringWithFlags
    0x00007ff685febec1 (Unity) PrepareScriptableLoopObjectData
    0x00007ff685feb1e5 (Unity) PrepareScriptableDrawRenderersJob
    0x00007ff686011c2b (Unity) JobQueue::Exec
    0x00007ff686013882 (Unity) JobQueue::Steal
    0x00007ff686011fd0 (Unity) JobQueue::ExecuteJobFromQueue
    0x00007ff68601243b (Unity) JobQueue::processJobs
    0x00007ff68601426f (Unity) JobQueue::WorkLoop
    0x00007ff6861df105 (Unity) Thread::RunThreadWrapper
    0x00007fff351a7034 (KERNEL32) BaseThreadInitThunk
    0x00007fff36f42651 (ntdll) RtlUserThreadStart
     
  21. nikk98

    nikk98

    Joined:
    Mar 8, 2021
    Posts:
    43
    From the documentation: https://docs.unity3d.com/Packages/c...50/manual/requirements-and-compatibility.html
    ""
    Currently, Hybrid Renderer does not support desktop OpenGL or GLES. For Android and Linux, you should use Vulkan. However, be aware that the Vulkan drivers on many older Android devices are in a bad shape and will never be upgraded. This limits the platform coverage Hybrid Renderer can currently offer on Android devices. OpenGL and GLES3.1 support are planned for a future version of Hybrid Renderer.
    ""
    Vulkan only for android.

    I spend a day figuring this out. It would be great if Unity through a warning when you were trying to use the hybrid renderer with an OpenGLES graphics API.

    Even better if OpenGL support is added. The performance on Vulkan is crazy good, so it's a shame we can't really use it on Android just yet.

    Also, this limitation pretty much rules out URP for me. The performance of GPU instancing is better on Built-in, and better than the URP SRP batcher with no GPU instancing in my tests. The URP + hybrid renderer V2 + SRP on Vulkan is up to twice as good GPU instancing + Bultin In, so I'd love to be able to use that.
     
    Last edited: Apr 20, 2022
  22. ZbigniewBrzozowski

    ZbigniewBrzozowski

    Joined:
    Jan 26, 2019
    Posts:
    4
    "Hybrid Renderer V2 is compatible with following shader types: ShaderGraph, HDRP/Lit, HDRP/Unlit, URP/Lit, URP/Unlit." this helped me!
     
  23. Jacob_z

    Jacob_z

    Joined:
    Jan 14, 2014
    Posts:
    2