How do you integrate Signed Distance Fields (SDF) into a basic three.js scene?

I’ve been experimienting a bit with SDF lately, and it seems that you can kind of mix threejs geometry with SDF using gl_FragDepth

The black plane with all the repeated spheres is a SDF scene, the cube is a classic threejs box geometry.