Signed Distance Fields (SDFs) define 3D objects via mathematical functions and can be combined in powerful ways, but rendering them via raymarching is computationally expensive. A novel recursive divide-and-conquer algorithm is proposed and implemented in Rust that subdivides the view frustum into smaller quads, advancing all rays in a patch simultaneously and recursively splitting only when near a surface. This approach achieves 3–4x fewer rays per pixel and triples frame rate on a simple scene. An extension using linear interpolation for flat patches reduces samples to below one per pixel, reaching 100 FPS on a single M1 CPU core. The technique relates to the known but obscure GPU concept of 'cone marching' using multi-pass shaders. The results suggest CPU-based SDF rendering for real-time 3D games may be within reach with further optimization and multi-core usage.
Sort: