Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Standard Fade shader but hiding inner triangles

Discussion in 'Shaders' started by javicodi, Jul 21, 2017.

  1. javicodi

    javicodi

    Joined:
    Jun 4, 2015
    Posts:
    1
    I'm trying to make my characters, who use Standard shader, semi-transparent to indicate they are currently invisible, but it shows the inner triangles and face, similar to this:
    42839-ghosttranslucencyfail (1).jpg

    I would like to cull them so it looks closer to this:
    Катрия.png

    I don't have much experience with shaders and I haven't found any post solving that.
    How could achieve that effect?
     
  2. brownboot67

    brownboot67

    Joined:
    Jan 5, 2013
    Posts:
    375
    Add rimlight to your shader. Change the Blend mode to One One. You don't need alpha fade.
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    That's a good tip but to correctly solve alpha (and not just this issue) you need a 2 pass shader, one pass writes depth first then the other writes the colour and alpha, etc.

    It's explained in the manual: https://docs.unity3d.com/Manual/SL-CullAndDepth.html