gpu-renderer.webm
This project showcases a GPU-based raytracer written in Rust for the browser. My goal was to create a simple, streamlined, and responsive renderer. Krust uses a highly optimized BVH to make traversing large models a breeze, and leverages MIS to enhance convergence. I opted for .glb files to simplify GPU data transfers and to ensure accessibility through a widely adopted file format.
Tech Stack:
- Rust: Core programming language.
- Wasm-bindgen: Facilitates communication between WebAssembly and JavaScript.
- React: Used for building the frontend user interface.
- Wgpu: WebGPU implementation in Rust, enabling high-performance graphics and computation.
Future Improvements Currently in Development:
- Subdivision (Catmull-Clark and adaptive)
- Subsurface scattering (diffusion and random walk)
- Volumes
- Radiance caching
Try out a sample scene on the website. Be sure to enable WebGPU in your browser.
To build and run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/krrud/krust-gpu.git cd krust-gpu -
Build and run the project:
cargo run
This project was inspired by the work of Shirley et al.
This project is licensed under the MIT License - see the LICENSE.md file for details.