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

Custom Pass only works when the Camera & Effect use 'Default' layer mask?

Discussion in 'Image Effects' started by PeterAndrewB, Dec 16, 2019.

  1. PeterAndrewB

    PeterAndrewB

    Joined:
    Nov 5, 2019
    Posts:
    7
    I've created a 'Depth Fog' custom pass that helps fade objects in with a fog color so they don't pop in as they reach the far clip plane.

    The problem I'm running into is that the effect only appears if the Layer Masks of the Custom Pass and Camera are set to 'Default'.
    I'd like to handle this using a 'PostFX' layer mask, but if I set both camera and custom pass to this, the effect doesn't appear.

    If anyone could shed light on this I'd greatly appreciate it! Thanks!
     
    SKoptev likes this.
  2. antoinel_unity

    antoinel_unity

    Unity Technologies

    Joined:
    Jan 7, 2019
    Posts:
    252
    Hello,

    I just tested and it works for me if I select the same layer in the custom pass and the Volume Layer Mask of the camera. Can you try with this setup?
    upload_2020-7-2_19-12-54.png

    Note that the actual layer of the camera does not affect the rendering of the custom pass.