Search Unity

Question How to make intersection shader visible through material

Discussion in 'Shader Graph' started by joxthebest314, Feb 20, 2021.

  1. joxthebest314

    joxthebest314

    Joined:
    Mar 31, 2020
    Posts:
    95
    Hi, I am quite new to the shader graph, and I did a "contact/intersection" shader. Everything works fine, except we can't see the contact effect that is applied on the back of the object.

    Here is a picture :

    upload_2021-2-20_10-29-43.png
    You can see the white line from the front of the mesh, but not the back one. Is there a parameter I missed ?

    Here is the graph :
    upload_2021-2-20_10-30-51.png
    Thanks for any help !
     
  2. florianBrn

    florianBrn

    Joined:
    Jul 31, 2019
    Posts:
    53
    In the Graph Inspector, check Two Sided. This way you'll be able to see faces which normals are facing the other way, like the ones on the back of the object. If you're using HDRP you'll also need to check it in the material settings.
     
    joxthebest314 likes this.
  3. joxthebest314

    joxthebest314

    Joined:
    Mar 31, 2020
    Posts:
    95
    Thanks, but the result is unexpected...

    upload_2021-2-21_16-2-52.png

    I don't really understand why
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    The Fresnel node doesn't work with two sided materials without a little extra help.
    upload_2021-2-22_16-14-4.png
     
    joxthebest314 likes this.
  5. joxthebest314

    joxthebest314

    Joined:
    Mar 31, 2020
    Posts:
    95
    Thanks a lot, that's perfectly working !