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

Errors when attempting to use Custom Pass Volumes in Unity 2021.2+ and HDRP 12.1.6

Discussion in 'High Definition Render Pipeline' started by JRW_WSP, Apr 14, 2022.

  1. JRW_WSP

    JRW_WSP

    Joined:
    Jun 26, 2017
    Posts:
    37
    Has anyone else been trying to get Custom Pass Volumes working with Unity 2021.2+ using HDRP 12.1.6? It was working last I used the system back in 2020.3.31f1 but seems to be broken now.

    Have tested in 2021.2.19f1 and 2021.3.0f1 - I've filed a bug report (Case 1420037) but thought I would post here as well to see if it others are experiencing or not.

    Steps to reproduce:
    • Create a blank new HDRP project
    • Add an empty GameObject to the scene hierarchy
    • Add a Custom Pass Volume to the GameObject
    Expected Behaviour:
    • Working Custom Pass Volumes
    Actual Behaviour:
    • Following errors in console and Custom Pass Volume does not appear to be working:
    Code (CSharp):
    1. Retrieving array element that was out of bounds
    2. UnityEditor.Rendering.HighDefinition.CustomPassVolumeEditor/<>c__DisplayClass19_0:<CreateReorderableList>b__2 (int)
    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
    Code (CSharp):
    1. Retrieving array element that was out of bounds
    2. UnityEditor.Rendering.HighDefinition.CustomPassVolumeEditor/<>c__DisplayClass19_0:<CreateReorderableList>b__2 (int)
    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
    Code (CSharp):
    1. ArgumentException: Getting control 3's position in a group with only 3 controls when doing repaint
    2. Aborting
    Code (CSharp):
    1. Retrieving array element that was out of bounds
    2. UnityEditor.Rendering.HighDefinition.CustomPassVolumeEditor/<>c__DisplayClass19_0:<CreateReorderableList>b__2 (int)
    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
     
  2. robot-ink

    robot-ink

    Joined:
    Jul 1, 2011
    Posts:
    18
    just tested on 2021.3.0f1 ARM, M1 mac (Metal), no issues, works fine

    EDIT: doh! hub created the new project in the older version (2020.3.18) - yes, i do get the same errors on 2021.3.0 :(
     
    Last edited: Apr 16, 2022
  3. JRW_WSP

    JRW_WSP

    Joined:
    Jun 26, 2017
    Posts:
    37
    Thanks for confirming! Thought it might be ok on Mac after your initial post but seems it may be across the board then (although would have been handy if more people chimed in right?).
     
  4. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    394
    I do experience similar behavior, meaning a lot of errors are being thrown to the console, but it seems that it might be only editor-related and it seems that the actual custom pass is working correctly, at least for me. Could you confirm that this is what is happening @JRW_WSP?
     
  5. JRW_WSP

    JRW_WSP

    Joined:
    Jun 26, 2017
    Posts:
    37
    No doesn't appear to work at all for me - get the errors and it appears to have no effect. This is all in the editor for me as I am simply using the Recorder package to render things out of Unity. When you are saying that is seems that the actual custom pass is working correctly for you do you mean in the editor or in a build? Cheers @nehvaleem !
     
  6. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    394
    I have tried it in the editor with the draw renderers custom pass and it seemed to work just fine, apart from lots of errors being thrown to the console of course. Great way to start a LTS release cycle :)