From Shader to Metaball
shud.in
shud.in
> if you write JavaScript, I think you are already familiar with the idea:
then shows sorting an array with pairs of elements a and b in javascript and says
> And we are calling it “signed distance from b to a”.
what do SDFs have to do with sorting an array?
Similarly, an SDF returns a number that represents how far a point in 3D space is from an object's surface. And, by calling that function strategically from a loop, you can draw a 3D scene using only that function.
I don't see how they're that interlinked other than saying that signed distance functions are a subset of comparators.
I've been doing some 2D stuff in Processing, but it's very slow, as the CPU doesn't have the same parallelism as the GPU.
Some really good creations there - all with source code.