A Recursive Algorithm to Render Signed Distance Fields
pointersgonewild.com
pointersgonewild.com
The demoscene is particularly insular, but even within the field of computing in general it seems that there is not a lot of knowledge diffusion between all the different areas, leading to some reinventions (often with distinct terminology.)
Those requirements and their different jargon from the mainframe world were re-discovered from the literature when virtualization in the PC world became a selling point.
(Edouard Bugnion et. al. - Hardware and Software Support for Virtualization)
I just run a low-res (256x256) pre-pass and store the distances to a floating point texture. I then use that pre-pass texture as the starting point (minus some delta) when drawing full-screen. This makes it really nice and performant, even for complex SDF shapes.
I think a common misconception in GPU programming is that branching is slow. It is only really slow when neighboring fragments diverges on those logic branches.
The quick pre-pass step gets close enough to the SDF surface that more fragments are in lockstep with each other and terminates at the same time, eliminating the expensive re-runs the GPU driver has to do. More experimentation is needed on my end. I do this in the browser with WebGL so accurate profiling is sometimes difficult.
I experimented with different resolutions and number of pre-pass steps but found it was sufficient on most GPU's with a single prepass run (subject to change the more I test).
You don't need bleeding edge hardware or software either. The game I'm working on generates a new SDF every frame for the scene (using the GPU's fragment units to rasterize the distance data for the objects in the scene into a scratch buffer) and then does cone traces through the generated SDF per-pixel to do realtime soft shadow casting and lighting, and that performs just fine even on an old laptop from 2015.
"I'm making a game engine based on dynamic signed distance fields (SDFs)"
That project is for GPU and it works by caching SDFs as marching cubes, with high resolution near the camera and low resolution far away, to build huge worlds out of arbitrary numbers of SDF edits.
So it probably wouldn't stack with these CPU optimizations that directly render the SDF at all.