Search Unity

Shader Graph / HDRP: Reflection problems, compile errors/warnings with transparent shaders

Discussion in 'Shaders' started by ShadyAlien, Jul 10, 2018.

  1. ShadyAlien

    ShadyAlien

    Joined:
    Aug 28, 2009
    Posts:
    210
    I'm having problems with transparent shaders made in shadergraph not receiving specular highlights or reflections from reflection probes. Everything looks fine in the material preview, but when I use it in a scene, it appears black from most angles. I'm using 2018.2, HD Pipeline 2.0.4, on Windows DX11. Images are from my existing project, but I've tried this on new projects as well with the same results.
    Images:
    Screenshot (117).png
    The node setup; previews look as expected.
    Screenshot (118).png
    How it appears in editor. The water in the background is using the standard lit shader, and looks fine, while the foreground water is using this new shader, and appears black.

    When the shader is compiled, these warnings appear:
    Screenshot (119).png

    Is this a known issue or am I doing something wrong? I haven't seen any other posts about this issue so I'm wondering if other people have experienced this.
     
    Last edited: Jul 10, 2018
  2. HD-MI

    HD-MI

    Joined:
    Mar 9, 2017
    Posts:
    13
    Hey, did you ever figure this out? Having the same problem.
     
  3. ShadyAlien

    ShadyAlien

    Joined:
    Aug 28, 2009
    Posts:
    210
    I still have not found a solution, unfortunately...
     
  4. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    35
    Last edited: Aug 31, 2018
  5. ShadyAlien

    ShadyAlien

    Joined:
    Aug 28, 2009
    Posts:
    210
    Interesting, I'll have to give that a try. I've had success dithering the transparency, but, it's dithering, so it's not an ideal solution for what I'm going after.
     
  6. ShadyAlien

    ShadyAlien

    Joined:
    Aug 28, 2009
    Posts:
    210
    Lerp didn't really change anything; so far, reflections and specular highlights only work right if I dither the transparency first. Oddly enough, it actually works better in the geometry queue instead of the transparent queue. Setting it to transparent makes the whole thing semitransparent regardless of the alpha channel, whereas geometry makes the alpha work properly.