Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

HDRP refraction on material using opacity

Discussion in 'High Definition Render Pipeline' started by pauldrummond, Jan 19, 2022.

  1. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I'm working on a material for the tearline mesh surrounding character eyes. This catches the light and suggest water around the eye. Turning on refraction enhances the effect, blurring the edges and making the tearline more realistic. However, refraction doesn't seem to work with opacity. The material should fade out from the centre line, reaching 0% opacity before the mesh edges marked below. As the image shows, the entire mesh is visible so there's a noticeable line.

    Should HDRP refraction support opacity, or will it always show the entire mesh regardless of the opacity channel in the material?

    Any help is much appreciated.

     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Is the eye itself opaque?
     
  3. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Yes it is.
     
  4. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Is this a limitation of HDRP refraction? Is it applied to the whole mesh regardless of material opacity?
     
  5. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    To test things I created a simple unlit shader which uses an alpha texture and distortion. The distortion seems to ignore the alpha. Is this deliberate?