SDFs in the scene - raymarching

Yes, that Koi fish moves with pretty much the same approach.

As I promised, here is an example with tangents, normals and binormals, sampled from DataTexture.
See getSplineData() method, that’s how I instantiate the spline and write its data into DataTexture.
Sampling of the data is in lines 78-81 (JS section).

Video:


Demo: https://codepen.io/prisoner849/full/dPyvLqQ

3 Likes