Skip to content

krrud/krust-gpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Krust Renderer

License: MIT

Example Video

gpu-renderer.webm

Table of Contents

Overview

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

Usage

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:

  1. Clone the repository:

    git clone https://github.com/krrud/krust-gpu.git
    cd krust-gpu
  2. Build and run the project:

    cargo run

Acknowledgements

This project was inspired by the work of Shirley et al.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

WebGPU raytracer written in rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published