Search Unity

Question Is it possible to duplicate geometry with shader graph?

Discussion in 'Shader Graph' started by MTUA, Apr 27, 2021.

  1. MTUA

    MTUA

    Joined:
    Oct 26, 2018
    Posts:
    29
    Greetings and salutations.

    Is it possible to duplicate geometry with shader graph? The several positions being defined directly in shader graph.
     
  2. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    61
    Up. I would really like to know too
     
  3. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Via shadergraph you can only modify existing geometry but not add any new vertices to a mesh.
    If you need to render the same object multiple times with just some different properties, look into GPU instancing.
    .
     
    Beauque likes this.
  4. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    61
    I see, thanks (I was looking to create an outline feature directly in the shader graph of the object's original material but it doesn't seem to be the way to go)
     
  5. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    A nice way to handle outlines in shaders is to have a second pass that renders the object again but inverts the normals and moves the vertices out.
    Sadly the shadergraph does not support multipass rendering, so this approach is not working.
     
    sivabalan93 and Beauque like this.