Accessing Non-Normalized Depth Buffer

Continuing the discussion from Seeking Advice on Optimizing Equirectangular Panorama Map Rendering Code:

I am using ‘depth’ AOV to derive an occlusion map. The issue I am facing is that the depth appears to be normalized to the min/max depth, rather than related to the near/far clipping planes. I have no way of determining if a value of 255 is unobstructed or the furthest pixel.

I would like to transform the pixel values back to absolute depth.

Thank you in advance for your help!

Best regards,

I found that using the ‘color’ AOV while setting RenderParams.clearColor with alpha set to 0.0, and using the alpha channel to determine occlusion, met my objectives.