Search Unity

Question Material multiplication

Discussion in 'Shader Graph' started by alkaitagi, Jan 15, 2020.

  1. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    87
    I am having two simple effects: one applies noise to a texture and the other one masks it with "rays". When I put those two materials on a SpriteRenderer (using custom script) they overlap with each other. Is there a way to "multiply" two materials so that, in this case, I would have noise applied only to masked areas.

    Of course I can convert the shaders into subgraphs and then create a third shader that would multiply them, but this solution does not scale as the number of different shaders grows so I am curious about the general solution.

    upload_2020-1-15_13-59-4.png
     
  2. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    87
    Unity's 2D Renderer settings provide both addition and multiplication options, but that seems to apply only to 2D lights.

    upload_2020-1-15_15-34-19.png