Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP: alpha clip shadows not working

Discussion in 'Graphics Experimental Previews' started by Ehredt, Dec 12, 2018.

  1. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    Hi! I'm using a ShaderGraph shader with an alpha based on a Texture2D property and an alpha clip threshold to create objects with transparent "holes" in them. Sometimes light will shine realistically through these holes, and sometimes it won't -- the area under the holes will be in shadow as though the holes weren't there at all, and it's very off-putting. It seems to be almost totally arbitrary: under some conditions, the shadows will flicker in and out (and sometimes disappear entirely) when the objects rotate and the camera moves closer and farther to and from the objects. This happens in the player window, the editor window, and in builds.

    The only consistent thing I can figure out is that the shadows seem to work very well when all of the objects' materials share the exact same Texture2D property in their alphas, but this isn't a realistic solution for me. Is there anything I can change, any setting I can switch, anything I'm missing, or should I submit a bug report?

    Thanks in advance for any help!
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    Hello!
    I'm not able to reproduce this issue, could you submit a bug report with a simple repro scene ?

    Thanks
     
  3. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    Hi! Thanks for checking in. I think I figured it out: I was using custom ShaderGraph nodes, and when I switched to the HDRP Lit node in 2018.3, I no longer had any issues, so it was most likely something in those custom nodes, especially because no one else using 2018.2 posted about this exact problem.