Hi,
I started using AOV Depth Image Sequence Recorder to record depth maps from my single camera.
My question is: how can I inverse the [0,1] range I have right now in .png, to actual distance from camera? Which parameters I can use for such a operation and is there something intrinsic that I can use for this?

Unity’s shader function for converting raw depth buffer values to linear view-space depth is as follows;

// Where:
// z - raw depth
// _ZBufferParams - x is (1-far/near), y is (far/near), z is (x/far) and w is (y/far)
inline float LinearEyeDepth( float z )
{
return 1.0 / (_ZBufferParams.z * z + _ZBufferParams.w);
}

Using that information, we can simplify the above into a function useable in C#;

Keep in mind that this is still view-space depth - you’ll need to do some additional calculations to translate that to actual 3D distance from the camera.