Search Unity

shader that conceals objects behind camera footage (similar to the Blender Holdout Shader)

Discussion in 'AR/VR (XR) Discussion' started by Septaros, Jul 20, 2018.

  1. Septaros

    Septaros

    Joined:
    Jul 20, 2018
    Posts:
    2
    Hiho Unity Community,
    i'm very new to unity, but i have an actual problem where i need a shader that is not visible but conceal objects behind this concealer object. I come from the blender world and there is a so called holdout shader that renders the object which it is attached to and everything behind it transparent.
    In unity i don't even know what to search for. maybe the gif helps to understand it.

    https://imgur.com/uuqmpl7
    The red object isn't visible, and it hides everything behind it.
    Every tip would be good. Maybe just a keyword will help, so i can search the forum for it.

    Thank you in advance and a happy weekend.
    SeppSowas
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    What you're looking for is called a Depth Mask. See here for example.
     
  3. Septaros

    Septaros

    Joined:
    Jul 20, 2018
    Posts:
    2
    Yeah, exactly what i'm looking for! Thank you very much.