Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Instancing: 'unity_RenderingLayer' shares the same constant buffer offset with 'unity_LODFade

Discussion in 'Shaders' started by DEEnvironment, Nov 19, 2021.

  1. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    hello any one have a idea what this one is
    Unity 2021.2.3 URP api 12.1.1

    Code (CSharp):
    1. Instancing: Property 'unity_RenderingLayer' shares the same constant buffer offset with 'unity_LODFade'. Ignoring.
    2. UnityEngine.Experimental.Rendering.ScriptableRuntimeReflectionSystemWrapper:Internal_ScriptableRuntimeReflectionSystemWrapper_TickRealtimeProbes (bool&)

    looking at cross fade "multi_compile _ LOD_FADE_CROSSFADE" is the same as api 10x and 12x added "multi_compile_vertex LOD_FADE_PERCENTAGE"

    what did i miss as i did not have this error in 2021.2.2
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Hi!
    This is worth a bug report :)
    Thank you!
     
  3. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    not certain yet about the path to replicate this yet
     
  4. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    @aleksandrk
    (Case 1385456) Instancing: Property 'unity_RenderingLayer' shares the same constant buffer offset with 'unity_LODFade'

    Unity 2021.2.4 URP api 12.1.1

    finally narrowed this down a little

    seams to be related to the combination of:
    instancing_options renderinglayer
    multi_compile_vertex LOD_FADE_PERCENTAGE
     
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Great, thank you very much for the bug report!
     
  6. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    the fix could be found in updating Visual studio 2022 and recompile
     
  7. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    follow up

    had some time to look at this again
    i found this was due to a change in #pragma

    #pragma instancing_options renderinglayer

    change
    #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap

    use of the correct #pragma should fix if any one reads this thread later

    cheers
     
  8. andeliseev

    andeliseev

    Joined:
    Mar 30, 2013
    Posts:
    7
    bug reproduced in urp 13 and hdrp 13. so it not fixed yet
     
  9. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    i suggest you file a new bug report so Unity QA can follow up
    perhaps you can reference case number (Case 1385456) for QA to find the detail history when you submit the new report

    case Number from before has already been closed
     
  10. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    changed from "pragma multi_compile _ LOD_FADE_CROSSFADE" to "pragma multi_compile_fragment _ LOD_FADE_CROSSFADE"

    pragma multi_compile_fragment _ LOD_FADE_CROSSFADE that is now found in api 14x also has the same problems about sharing the same command buffer

    compile was found using VS 2022_17.2.1

    note URP 12x terrain used in forward pass and Gbuffer
    #pragma instancing_options norenderinglayer assumeuniformscaling nomatrices nolightprobe nolightmap

    however it may need to be ?
    #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap

    the section for norenderinglayer seems to be part of the problem
     
    Last edited: Jun 27, 2022
  11. Snigros

    Snigros

    Joined:
    Jun 12, 2018
    Posts:
    37
    Still seems to be a problem with Unity 2021.3.7f1 (and Visual Studio 2019)...effectively makes light layers unusable...
     
  12. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    QA recommended update VS

    with URP just keep using pragma multi_compile _ LOD_FADE_CROSSFADE
    when you get to api 14.0.3 and higher it can change to the fragment ok

    in 15x i think they will add
    #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl
     
  13. Snigros

    Snigros

    Joined:
    Jun 12, 2018
    Posts:
    37
    Thanks DDE...just to clarify, do you know if Visual Studio 2022 is "officially" supported for use with Unity (and if so for which Unity versions)? I tried doing a general search for this but couldn't find anything definite...
     
  14. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
  15. Snigros

    Snigros

    Joined:
    Jun 12, 2018
    Posts:
    37
  16. Marald

    Marald

    Joined:
    Jan 16, 2015
    Posts:
    42
    Same message suddenly appeared in my project 2021.3.24 & .25
    Any solution for this? Or pointers where to look?

    My message says:
    Instancing: Property 'unity_RenderingLayer' shares the same constant buffer offset with 'unity_LODFade'. Ignoring.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    Have tried recompiling, using VS 2019 & VS 2022, rebuild library etc. But still I get the message in the editor. Sometimes 4500 times in a few seconds, than it keeps on that number. Unless you do play, then it always reappears.
     
  17. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    I'm getting this error after updating from Unity 2021 to Unity 2022. I have the latest package and updated VS and tried pragma multi_compile_fragment _ LOD_FADE_CROSSFADE.

    Any other advice to get this to stop? Thanks!