Screen space shadow/Cascade shadow atlas, how do you access them?

Hi all,

I am trying to solve a problem that I think might require a custom pass but I want to run it through the experts here before I start.

Goal:

Make ambient color stronger in shadowed area, in a dynamic light settings.

Why some obvious solution doesn’t work for us:

  • Use Shadow Dimmer/Tint option on Light? They cause specular to show up in shadowed area.
  • Use Post processing? They incorrectly remap darker material that’s not shadowed.
  • Use stronger ambient? They cause lit area to be too bright.

So:

We have setup our lighting to behave correctly, the only additional stylization we want to do, is make shadowed area brighter, without causing problems above.

Without modifying every material in the scene, it seem I would have to inject a custom pass before post processing, that re-shade the shadowed area?

Is there a better way?

Thx in advance!

So I have tested custom pass/custom post process and a problem came up:

I do not know how to read the cascade shadow.

I thought ticking “Screen Space Shadows” toggle in both HDRP Asset and Frame Settings would help, but I am not able to find any additional pass in frame debugger that render screen space shadow texture.

Without that, I was thinking of getting the _ShadowMapCascadeAtlas and use it with GetDirectionalShadowAttenuation(), but quite literally no one have done it on this forum? I am aware of one mention by @SebLagarde here but that’s it:

I understand HDRP folks want to keep forward and deferred features in parity, AND not lock down the GBuffer layout, but does it also rule out access to screen space shadow or cascade shadow map?

I have been looking at official custom pass samples and I find no answers to these questions.

https://github.com/alelievr/HDRP-Custom-Passes

@Remy_Unity @antoinel_unity @SebLagarde if any of you can comment, please do, because I am not sure whether I am trying to do something that’s not supported / too expensive in HDRP?

I should add that I am on Unity 2019.4.16f1 + HDRP 7.5.2 release.

So, based on the lack of replies, I am guessing this is not possible without forking HDRP?

While this doesn’t answer my original question, I did discover that “Screen Space Shadows” here is meant for DXR only.

Non-DXR shadow simply ignore this setting.

looking for the same thing, so is it impossible to get any light/shadow data in HDRP post processing?
I know we can not get any custom light data in a custom shader, but i would think in post processing it should be available…