Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Double sided shader with back face offset

Discussion in 'Shader Graph' started by Micz84, Jan 12, 2023.

  1. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    436
    Hi.

    is it possible to do a double-sided shader with an offset that can be set using properties?
    I can move the vertex position in the vertex part of the shader but the "Is Front Face" node is only for pixel shader so I can't just move one side.
     
  2. ArturoNereuUnity

    ArturoNereuUnity

    Unity Technologies

    Joined:
    Sep 4, 2014
    Posts:
    17
    If I understand correctly, I don't think you can achieve that without making copies of the vertices.
     
  3. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    436
    In built-in, I can create a shader with two passes, one with the cull front and the other with the cull back. One of the passes can move the vertex with a given offset.
     
    Last edited: Jan 12, 2023