Search Unity

Question Shader Graph: Double sided Fresnel

Discussion in 'Shader Graph' started by alexxUID, Nov 17, 2020.

  1. alexxUID

    alexxUID

    Joined:
    Jan 14, 2020
    Posts:
    48
    Hi,

    I am a bit stuck here:
    I want to create a shader, that is using a Fresnel effect on a transparent object. I want to fade out the rim of the object as well on the front as on the back facing faces.
    All is working fine on the front faces, but the back ones simply don't react as i expect.

    Is there a way to seperate the handling for front and back facing?

    Thanks
     
    joshnaro likes this.
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Hi,
    If you need to apply an effect to both front and back faces, could you use Is Front Face? Use Branch node and then Is Front Face as the predicate to test which effect you apply to the faces.
     
    joshnaro likes this.
  3. alexxUID

    alexxUID

    Joined:
    Jan 14, 2020
    Posts:
    48
    Hey cool, this looks promising.
    Gonna have to make the fresnel now apply correctly to the back face, since the numbers seem to be off but I will check that tomorrow.
    Thanks a lot.