@gee8sh
  @gee8sh
Ghadeer Abou-Saleh | Scalar Field Isosurface Ray Casting with WebGPU [No Audio][HD] @gee8sh | Uploaded December 2023 | Updated October 2024, 4 days ago.
This toy explores rendering scalar field isosurfaces with WebGPU using a method that could be thought of as a hybrid of Ray Marching and Marching Cubes.

Unlike Ray Marching, which usually uses Signed Distance Fields (SDFs), this method uses the scalar field itself and its gradients to determine the sizes of the steps that the tracing rays should march by until they hit the selected isosurface. All the ray marching happens in the fragment shader.

And unlike Marching Cubes, this method does not polygonize/tesselate the isosureface, as it uses Ray Casting rather than the conventional rasterization-based rendering. However, it does sample the scalar field and its gradient in a separate compute shader at the points of a 3D grid, and stores the samples in a 3D texture that could be sampled using linear interpolation.

The scalar field of choice is actually a noise field generated by starting from a simple base scalar field, and then recursively superpose a few translated, scaled and rotated copies of that field onto itself.

Using keyboard shortcuts, you could control some viewing aspects, as well as some of the parameters used to generate the scalar field. This is what you see happening in the video as the mouse is dragged on the canvas. It is basically changing the scaling and rotation parameters used in generating the noise field, as well as rotating the model and selecting different isosurfaces.

The demo can be found here:
ghadeeras.github.io/pages/scalar-field-tracing

The source code can be found on GitHub:
github.com/ghadeeras/ghadeeras.github.io/tree/master/src/scalar-field-tracing

Cheers!
Scalar Field Isosurface Ray Casting with WebGPU [No Audio][HD]Path Tracing with WebGPU - Attempt #1 [No Audio]Path Tracing with WebGPU - Attempt #3 [No Audio]Path Tracing with WebGPU - The Floating Eyeball! :-) [No Audio]

Scalar Field Isosurface Ray Casting with WebGPU [No Audio][HD] @gee8sh

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER