HDShadowAtlas access to lights shadowmap | camera depth only pass | fog of war w/occlusion

Got stuck when tried to implement “fog of war” with additional occlusion effect - when anything is occluded from character’s line of sight - it’s also “fogged”.
Got working basic solution - without occlusion, it works simply in postprocess (CustomPass), testing depth buffer against analytical shapes originating in player’s head) as seen on attached screenshot:

Had two ideas about how one would implement this:

  1. place realtime spotlight source with shadowmap and low luminous intensity (= 0.0001 lumen) into player’s head. And access light’s shadowmap from CustomPass.
    But HDShadowAtlas and ShadowRequest are not exposed to external world :frowning:
    Any way to fetch light’s shadowmap without “hijacking” HDRP code and breaking forward compatibility?

  2. make second camera and force depth-only / depth prepass rendering. place it into player’s head, and copy depth buffer during “CustomPass” for second camera & use it in CustomPass of first camera. How one would force “offscreen” camera rendering and depth-pass only?

Wondering what is the “best practices” approach to implement this on top of HDRP?

P.S. Appologize for posting in this forum, is there a way to move this post into HDRP forum Unity Engine - Unity Discussions ?

Maybe anybody can give a slight hint?