Reposting this in carts, because it's as finished as it's ever going to be :-).
This is a little SDF ray marcher I've been playing with.
It renders two randomly placed spheres and a torus above a checker-board plane in different colours. Often one of them is reflective.
The code is ugly as heck, and the specular highlights are completely wrong, but it occasionally spits out something pretty imo.
Update: Changed to use sqrt() again, as it's much more accurate in v0.2.0
[Please log in to post a comment]