Search Unity

Incorrect rendering of shader for edge glow.

Discussion in 'General Graphics' started by Vorisaj, May 8, 2019.

  1. Vorisaj

    Vorisaj

    Joined:
    Aug 10, 2014
    Posts:
    2
    Hi all,

    I am trying to create shader which will create effect of glowing edges. So I created following shader:
    upload_2019-5-8_11-56-14.png

    However, when applied to object it renders completely incorrectly.
    upload_2019-5-8_11-58-35.png

    Any hints where the issue can be?

    Thanks a lot!
     
  2. swanijam

    swanijam

    Joined:
    Nov 14, 2016
    Posts:
    23
    fresnel doesn't exactly make edges glow - it makes pixels brighter when viewed at a glancing angle The smooth edge glow as seen in the sphere in the preview depends on the surface being smooth at the edges of the silhouette. So, fresnel doesn't work for lowpoly surfaces or flat surfaces.