A simpler way: You can avoid sampling neighbours by clamping the ray-march step so it never moves further than the current cell's boundary (plus a tiny epsilon). That way, you only cross into adjacent cells at the edge and avoid the 8 to maybe 26 extra SDF samples. (This only works if the geometry is entirely contained within each cell.)
by kscarlet
2 subcomments
Cool language! What language and library is this?
by omnicognate
1 subcomments
What's an SDF?
by NKosmatos
0 subcomment
Just opening this page is a "heavy" benchmark for your PC/browser :-)