Search Unity

Question How to blend two materials (not textures)

Discussion in 'Shader Graph' started by Jelmer123, Aug 13, 2019.

  1. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    Hi

    In 3DS MAX, I often mix 2 completely different materials using a Blend material that has 2 materials as sub materials. They are blended using a mask (2D texture).
    Is this possible in Shader Graph? Or can't you parent/child full materials?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Not possible with Shader Graph. Not possible with real time shaders in general unless you write a custom shader that does it for you. The closest you can have is render your object twice with two separate materials, and have one be set to transparent with a mask to fade it out. Otherwise make a new Shader Graph with both “shaders” in it and lerp between them.
     
    ProtoPottyGames and Jelmer123 like this.
  3. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
    layered shaders are a forward rendering feature if Im not mistaken and game engines usually don't do that
    Even renderers like Octane only support it with cheap hacks like mix shaders blending 2 together
     
    Jelmer123 likes this.
  4. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    Ok thanks for the insights! I will then use one material and make a blend for each mapping (albedo, normal, specular etc etc)
     
  5. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    Has anybody tired to "Blend" two materials using dithering and alpha cutout.
    Render one material and second material on top with 'depth test equals' and alpha cutout driven by dithered alpha.
    Would It work in HDRP ?