I am not sure that would work - since the zdepth is distance from the camera, the edges of image will be at a different distance than the center of the image, and since you'd have to set a really small difference between near and far for something like bricks, then you would likely get what we see here - it would work in the center of the image, but out at the edges, since the distance is significantly different to those points (given the small range of the distance map settings required), they'd show up as all black and all white depending on settings for near and far.