reversedDepth property

bool reversedDepth
getter/setter pair

Whether camera passes store depth reversed, 1 at the near plane and 0 at the far plane.

A float depth buffer has fine steps near zero, and reversing puts them in the distance, where the standard mapping is coarsest. With float depth (Metal, and the web on browsers with clip control) this spreads precision almost evenly over distance, so distant surfaces a few centimetres apart stay distinct instead of flickering (z-fighting). On 24-bit depth it changes nothing. Shadow maps, the public projection, and every depth effect read the same values either way.

It costs nothing per frame. Turn it off only for a custom ShaderMaterial vertex shader that writes clip-space depth assuming the standard mapping (a sky drawn at z = w, say). Defaults to true.

Implementation

bool reversedDepth = true;