I try to export precise depth information from Eevee's z-buffer, however on gentle slopes it produces a step effect, which led me to believe the Eevee's z-buffer might use half precision floats to store its depth. Can I increase the precision of Eevee's z-buffer or access the higher precision depth somehow without applying a special material to my object? I'd need the full precision as I try to construct a precise depth-map to generate ground truth for a scientific application.
The precise depth seems to be there, because when I access the depth information via the Camera Data using a custom material and render the slope with that applied, I get a nice gradient. The same is true for the Cycles renderer, however, I'd like to use Eevee because it is much faster, and I do not need any other fancy features.
The scene I'm rendering is a simple plane with a 5-degree slope and a perspective camera looking down on it.
The following render was produced by feeding the normalized depth information of the Render Layer to the Composite node, resulting in the mentioned step effect:
However, using this simple shader where I just feed the Camera Data View Z Depth to the Material Surface...
... I get the nice gradient I'm looking for:
Nonetheless, I'd prefer using the z-buffer directly, because switching materials complicates my setup, and as of now Eevee doesn't seem to support global material overrides.