Search Unity

Question Using Texture2D as a mask

Discussion in 'Shader Graph' started by eco_bach, Jun 14, 2019.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Trying to do something which should be fairly simply. I have a Texture2D element being rendered in a RawImage component. I need to somehow make this RawImage +Texture2D act as a mask to elements below it.
    So I assume I need some type of custom material - shader applied to the RawImage to make it work this way.
    Can anyone get me started? Are there any ShaderGraph examples that use a Texture2D element for masking?