Still toying with #webgpu ... Not sure what I was trying to accomplish with this example, or what I was expecting exactly.
I suppose it is a hybrid of #raycasting / #raymarching (not with a signed distance field, but with scalar field gradients) and #marchingcubes (minus the polygonization). Maybe there is a proper name for it in the graphics circles?
I am using a #compute #shader to create a 3D texture with scalar field values and gradients, and sampling it in the fragment shader (the thing that shoots it with rays )
Assuming the compression did not kill it, I kinda liked the quality more than using the conventional marching cubes/tetrahedra. Still, it might be a waste of GPU power on something simple. Also there are some undesirable artefacts that I could not get rid of.
The toy could be found here: https://ghadeeras.github.io/pages/scalar-field-tracing
More gooey #webgpu stuff! This time playing with #recursive #noise
There is something satisfying about the way the surface deforms!
Speaking of recursive noise, I wish #wgsl supported tail recursive functions. But I suppose a shading language is not meant to be too complicated to implement.