Search Unity

Light Matte Shader

Discussion in 'High Definition Render Pipeline' started by mslong, Feb 14, 2020.

  1. mslong

    mslong

    Joined:
    Apr 24, 2016
    Posts:
    28
    It's a well worn conversation on how to build a "shadow matte" shader (transparent shader that only shows received shadows), and Unity even has an option on their Unlit shader graph - "shadow matte" - that makes this easy in HDRP.

    But I haven't seen any conversation on how you might go about doing the inverse - a "light matte" shader that shows only received lighting values.

    Has anyone seen this done yet in HDRP? It would be especially amazing if this would be possible with RTX lighting data - but I won't hold my breath.
     
    Last edited: Feb 14, 2020
  2. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    557
    Hi, in HDRP you have Light layers / Shadow Layers and Shadow matte. With this combination you should be able to do what you want. Shadow layers would allow to disable shadow but receive the lighting. You can check the Light documentation, it is in advanced settings of a light under shadow section.
    Note: shadow matte is not compatible with raytracing currently.
     
    mslong likes this.
  3. mslong

    mslong

    Joined:
    Apr 24, 2016
    Posts:
    28
    Thanks @SebLagarde, I was able to get something working based on your advise. I appreciate you pointing me in the right direction!
     
unityunity