None of these codes work in the HD Render Pipeline and the produced Depth-map is all black! I guess there are some customization needed to get the depth from camera in HDRP!
I’ve opened and issue on SRP’s Github page and got a response that some customization needed in the Render() function in HDRP source but all issues have been removed from there. My problem was that I can not get the depth rendertexture from the 2nd camera in scene.
@SebLagarde I still couldn’t get my head around customizing the Render() function in order to include the Depth in the rendertexture from camera! Your help and real code example is really appreciated.