Search Unity

Transparent shader for closest face

Discussion in 'Shaders' started by thestrandedmoose, Apr 28, 2019.

  1. thestrandedmoose

    thestrandedmoose

    Joined:
    Jul 21, 2015
    Posts:
    70
    Hey guys- when using a Standard transparent shader, I am noticing that it is rendering faces that would normally be obscured. For instance, I can see the inside brim of my character's hat.

    https://imgur.com/KMrI4ww

    Is there a way to make a transparent shader exclude faces that would normally be obscured? For instance: the inside of my character's hat and back of his ears would not be visible with an opaque shader. Basically I want an opaque shader that has an alpha applied to it

    Also I'm a total noob at writing shaders, so any help is much appreciated!
     
  2. Helix_Snake

    Helix_Snake

    Joined:
    Feb 23, 2016
    Posts:
    13