Search Unity

Question How to change Alpha Blending way in UI?

Discussion in 'Shaders' started by EQ1, Aug 5, 2021.

  1. EQ1

    EQ1

    Joined:
    Jul 3, 2016
    Posts:
    1
    Hello! I have problem with UI alpha blending.
    Usually, if you overlap two images and adjust Alpha using Canvas Group, it is shown in the picture.
    The overlapped part of the two squares is multiplied by Alpha and looks like blue with 75% transparency.

    upload_2021-8-5_11-16-21.png

    But I want to make this like the picture below.
    upload_2021-8-5_11-20-9.png
    I hope that the two squares will be combined as if they were one, and then affected by the Alpha value of the Canvas Group.
    How can I achieve this?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,339
    You'd have to use an image mask to mask one of the squares. And you'd have to set the textures to use point filtering as the default masking system doesn't support soft masks.