Search Unity

DepthMask shader that alters transparency

Discussion in 'Shaders' started by 11tomi12, Oct 17, 2019.

  1. 11tomi12

    11tomi12

    Joined:
    Feb 25, 2016
    Posts:
    17
    I wish to create some sort of mask that will render meshes behind it more transparent.
    At the moment I have a Z-buffer shader that completely hides objects behind it. I want to add a transparency effect, preferably with a property where I can set the transparency value. Since I am very noobish in shaders I have no clue how to do that :(

    This is how my example looks so far. The white border represents the edges of the Quad with the mask.




    Thank you for any help! :)
     
    Last edited: Oct 21, 2019