Search Unity

UI - Mask & Transparency

Discussion in 'UGUI & TextMesh Pro' started by Deleted User, Oct 14, 2015.

  1. Deleted User

    Deleted User

    Guest

    Hi,
    I am using the new UI system.
    I am trying to displaying an image with a mask on the top of it. It works well, but I would like my mask to have have "soft edges" with a gradient of transparency. If I just tune the alpha of my mask picture it is not taken into account and just display/hide part of the underlying image.

    Is it even possible to define a transparency with a mask ?

    Thanks in advance,
    Stephane
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,283
    Hi,
    We are using the stencil buffer which is either on or off for masking. You could potentially do this with a custom shader on the element that is being masked.