Search Unity

Bug Hybrid Renderer V2 and Shader Graph compatibility

Discussion in 'Graphics for ECS' started by teasully, Apr 7, 2021.

  1. teasully

    teasully

    Joined:
    Nov 26, 2016
    Posts:
    17
    Hello,

    I am currently using the Hybrid Renderer V2 paired with a custom shader made in Shader Graph. I seem to be getting an error on Editor run and also building. Is there some sort of compatibility guide I should be following for Shader Graph and DOTS or is there a way to add a DOTS_INSTANCING_ON tag to the shader?

    I am receiving this error:

    A Hybrid Renderer V2 batch is using the shader "Shader Graphs/2D_voxel", 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.

    I am using Unity 2021.1.2f1 but this error has persisted for multiple versions.

    Thanks
     
    MNNoxMortem likes this.
  2. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    136
    teasully likes this.
  3. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    700
    MNNoxMortem and teasully like this.
  4. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    Also ran into this with Unity 2021.3.2f1. Sadly.
     
  5. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    136
    As posted also in another thread discussing this same issue: My fix to get my unlit URP Shadergraphs working again on 2020.3.3f1 (=last supported Unity version for DOTS for at least the rest of the year) was to downgrade Universal RP and ShaderGraph from 10.4.0 to 10.3.2. Which used to be easy via Package Manager; did it now via editing manifest.json:
    Code (CSharp):
    1. "com.unity.render-pipelines.universal": "10.3.2",
    Snap..all error spamming gone, back to normal.
     
    dev-borisov-alexey and KenDoolin like this.
  6. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    In another thread, @DK_A5B pointed out a fact that I have overseen.

    Unity just announced that the Entities package (which the Hybrid Renderer is dependent on) is not supported on any version of Unity 2021

    For me, I have trouble with HDRP, I'll try to downgrade and see if it's working otherwise I will downgrade unity back to 2020. Will see maybe also the lights will work in a combination with GPU Instancing, once I downgraded.
     
  7. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    966
    Wait what? Where did you read this?
     
  8. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    here

    Future releases of Entities will not be compatible with Unity 2021 until the end of the year at the earliest. Upgrading to 2021.1 and using current or future Entities packages will not work and is not expected to work.


     
  9. DK_A5B

    DK_A5B

    Joined:
    Jan 21, 2016
    Posts:
    110
    One thing I should've added to my
    A warning I want to add here. Downgrading (opening a project in a lower/previous version of Unity - e.g. opening a 2021.1.x project in 2020.3.x) isn't supported by Unity. This may lead to unexpected bugs and issues, so you'll definitely want to back up any projects before attempting it. A better approach may be to create a fresh project in the target version and then import/copy/recreate your assets from the original project in this fresh project. Obviously, depending on your project and what type of assets you have this can either be pretty trivial (just copying some source files) or rather time consuming (recreating nested Prefab assets).
     
  10. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    966
    Thanks! I'm daily in this forum, I can't believe I missed that. There are so many pins, I don't even see new pins. lol
     
    MNNoxMortem likes this.