Search Unity

Question Ghost Shader - transparency without backfaces

Discussion in 'Shader Graph' started by ShaunUnity, Feb 14, 2020.

  1. ShaunUnity

    ShaunUnity

    Joined:
    Dec 8, 2017
    Posts:
    28
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Yep! ... you don't because it's not possible!

    :(

    That effect requires a multi-pass shader. Shader graph does not currently support multi-pass shaders. For the HDRP the built in Lit shader has support for this built in, but that's as close as you can get with it as a single shader. Also with the HDRP you could make two separate shader graphs, one that just renders transparent with an alpha of 0.0 and Depth Write enabled, and a second graph that's renders normally. Then you'd need to duplicate your object so it can be rendered once with the first material and a second time with the other.

    For the URP you can't enable Depth Write on transparent Shader Graphs so the only option is to hand write a shader without Shader Graph at the moment.
     
  3. LandonTownsend

    LandonTownsend

    Unity Technologies

    Joined:
    Aug 21, 2019
    Posts:
    35