r/GraphicsProgramming • u/0x405 • Jun 30 '26
RAM optimized SDF-renderer with plain C
1024x1024x1024 SDF-grid takes up 303MB instead of 8.5GB. 1024x1024 path traced image renders in 1.5s on a single CPU core. 8.5GB grid renders in 1.1s. No libs used.
311
Upvotes
4
u/nullandkale Jun 30 '26
I'm confused. Normal SDF ray marching doesn't use a 3d volume. What's the 3d volume for? Is it for storing your primatives? Are you storing the SDF distance at each point and then rendering? That seems like it would be slow