Search Unity

[HDRP] Getting light attenuation / shadowed areas info

Discussion in 'Shaders' started by Fnyt, Aug 1, 2019.

  1. Fnyt

    Fnyt

    Joined:
    Jun 25, 2018
    Posts:
    1
    Hello,

    Lately, I've started a project in HDRP pipeline and I wanted to rewrite a shader which manipulates the shadowed areas of an object (self-shadows and other as well). I was getting the shadowed areas via light attenuation (I was using a single directional light as the main light).

    That approach was working just fine in the regular pipeline and LWRP as well, but due to the HDRP specifics I cannot get any info regarding lighting. Plugins like Shader Graph or Amplify don't have these nodes only for HDRP and I couldn't gather much info on how to solve this issue.

    Is there any painless solution to this problem? Ideally, I'd like to have some info like 1 for shadowed area and 0 for not shadowed. Is it possible do achieve it without having to code own shadow caster from scratch or stuff like that? I much prefer using graphs.

    Thanks in advance. Also, sorry if I chose the wrong subforum, I wasn't sure where to put it.
     
    yoshihara-s likes this.