Search Unity

Matte Shader (Only Shadows) in HDRP

Discussion in 'High Definition Render Pipeline' started by herrenderschoepfung, Sep 6, 2019.

  1. herrenderschoepfung

    herrenderschoepfung

    Joined:
    Nov 18, 2016
    Posts:
    4
    Hi everyone,

    I'm using HDRP for my current project and I need to cast a shadow on a transparent plane. So far I found quite a bunch of tutorials on how to do that using regular Unity shaders in SRP, but none for HDRP (preferably using default shaders or Shader Graph).

    Thanks for your help!
     
  2. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    198
    I think semi-transparent shadows are for Realtime Raytracing only. That's the only way I know that works in Unity out of the box.
     
  3. mslong

    mslong

    Joined:
    Apr 24, 2016
    Posts:
    28
    @Bordeaux_Fox what do you mean exactly? Like you can make a Shadow Matte shader (transparent shader that receives only shadow info) for RTX shadows in HDRP? How would you go about doing that?
    I realized last night that Unity has an option for making a shadow matte in the Unlit shader graph, but when I played around with it it had fairly bad results with RTX shadows. Have you had success making an RTX shadow matte shader?
     
    Last edited: Feb 14, 2020 at 3:04 PM
  4. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    198
    Last edited: Feb 15, 2020 at 4:12 AM
  5. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    519
    Hi,
    maybe there is confusion regarding name.

    For rasterization we support:
    - opaque shadow from opaque and transparent
    - shadow matte (with unlit shader, those are shadow only without lighting from light)

    For raytracing we support:
    - Colored or not directional shadow
    - Monochromatic spot / point shadow (what is call semi-transparent in the documentation)
     
unityunity