I’ve been using logarithmic depth buffer in three.js for both WebGL and WebGPU for a while, and it works great for eliminating z-fighting at large distances.
But beware…if you have logarithmicDepthBuffer enabled, and you are rendering many sprites in your scene (for example, thousands of grass/foliage sprites on a terrain), you will incur a noticeable decrease in performance!
I did some testing with and without logarithmicDepthBuffer on my terrain scene (with thousands of foliage sprites in InstancedMesh objects), and having it enabled reduces the FPS by 20 percent!
This is because logarithmic depth must write to gl_FragDepth (GLSL) and frag_depth (WGSL) in the shader, which disables early-Z testing. When early-Z testing is disabled, all grass sprite fragments will run regardless if fragments are occluded, resulting in massive overdraw!
Be sure to switch to reverse z-buffer when it is implemented in three.js!