Skip to content

XxAdi101xX/WebGPU-Ray-Marching

Repository files navigation

WebGPU Ray Marching

A rendering engine created using WebGPU that implements the sphere tracing algorithm with signed distance functions to march rays across the scene. The current implementation supports rendering opaque objects alongside transparent ones. Phong lighting is used to luminate the scene with single scattering utilized to shade transparent volumes.

A simple camera has been implemented to allow for using WASD to move along the x and y directions and using EQ to move along the z direction. You can orbit the camera by clicking and dragging the mouse on the canvas.

transparent_ray_marched_volume

webgpu-raymarcher

Build

To run the build, simply run npm start from the root folder after conducting a simple clone of the project. Then navigate to http://127.0.0.1:8080/.

Ensure that you have WebGPU enabled on your browser. This might require running the application using Chrome Canary.

Resources

Some of the great learning resources that I've used for technical help and motivation:

About

A ray-marching renderer using WebGPU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published