Search Unity

Resolved Coloring and combining 'polygon' nodes

Discussion in 'Shader Graph' started by lifeisabeach, Jul 21, 2021.

  1. lifeisabeach

    lifeisabeach

    Joined:
    Apr 26, 2020
    Posts:
    47
    Hi!

    I'm trying to combine multiple 'polygon' nodes, with different shapes, colors, and transparency, on the same shader graph, but I'm not getting it to work.

    For example, let's say I want to combine a blue 'rectangle' and a red 'ellipse', with a transparent background. How can I do that?

    I tried using the black and white shapes as the alpha channel, and a color as the rgb channels, and combine them, but that didn't work. And other ideas like that, but haven't got it to work yet.

    I appreciate if anyone has ideas on how to achieve that.

    Thanks!
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
  3. lifeisabeach

    lifeisabeach

    Joined:
    Apr 26, 2020
    Posts:
    47
    Thanks @Qriva ! I didn't know of the lerp node, believe it or not, and it is extremely useful. After some trial and error, I'm getting my shader to work. Thanks for pointing me towards that answer, I didn't see it or didn't associate it to my problem but it really is similar and a great reference.