Search Unity

Question CustomPass without effect

Discussion in 'High Definition Render Pipeline' started by AnKOu, May 26, 2021.

  1. AnKOu

    AnKOu

    Joined:
    Aug 30, 2013
    Posts:
    123
    Hello,

    I want to display a HUD in VR.

    So I need to set my canvas render mode in WorldSpace and use a CustomPass to render it after the post process.

    Here is my CustomPass in the scene :

    upload_2021-5-26_18-28-17.png

    The layer STATIC_UI contains all UI element.
    I removed this culling mask from my camera and it should be draw by this CustomPass. Unfortunately, it doesn't work.
    My UI gameObject have their layer set to STATIC_UI and if I add this culling mask to the camera, they are drawn.

    I think the CustomPass is not active because I can't find it in the frame debugger :

    upload_2021-5-26_18-28-49.png

    But it is set active in inspector. And my HDRP asset has the CustomPass enabled.

    upload_2021-5-26_18-30-15.png

    I wonder what I have done wrong... ?
     

    Attached Files:

  2. AnKOu

    AnKOu

    Joined:
    Aug 30, 2013
    Posts:
    123
    I just figure out that if the gameObject where the CustomPassVolume is has a layer different from default, it just won't work at all. Not present in frame debugguer, no breakpoint executed in code etc.

    Why !? Is this a bug ?
     
  3. antoinel_unity

    antoinel_unity

    Unity Technologies

    Joined:
    Jan 7, 2019
    Posts:
    264
    Hello,

    I believe that your issue is caused by the camera volume mask parameter:
    upload_2021-5-27_18-13-47.png

    By default, only the camera is only affected by volumes and custom pass volumes on the default layer
     
  4. AnKOu

    AnKOu

    Joined:
    Aug 30, 2013
    Posts:
    123
    Ah yes, that is probably the reason, thank you !