Search Unity

Question How to overwrite one tex on another like photoshop layer?

Discussion in 'Shader Graph' started by ununion, Jun 20, 2020.

  1. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    I m trying to overlay one texture on another,i try to use blend node and set to overwrite,it works.but I want to overwrite a transparency texture on another ,how to do that?
    upload_2020-6-20_18-14-53.png
    please look at the picture, the second picture has alpha channel,how can i only overwrite the ice-cream on background?
     
  2. florianBrn

    florianBrn

    Joined:
    Jul 31, 2019
    Posts:
    53
    Plugging the Alpha output from your second Sample Texture node into the Opacity input of the Blend node should do the trick.
    The Opacity output acts like a mask from Photoshop, so you can use the alpha of your texture here to define which part should show your icecream and which should show the other texture.
     
  3. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    it works my friend, thank you very much!
     
    florianBrn likes this.