/rrt

A ray tracer built in Rust that can run in your browser via WebAssembly.

Primary LanguageRust

Rust Ray Tracer (rrt)

A ray tracer built in Rust that can run in your browser via WebAssembly (demo).

demo

Based on:

Usage

Requires npm and rust:

npm install
npm run dev

If you want to run the ray tracer natively in rust (rendered image is written to output.ppm), run the following (available examples in crates/rrt/examples):

cargo run --example --release scene1

Deploy to Vercel

Vercel doesn't play well when builds are run on their servers, so as a workaround, we can just build locally and deploy the local build via the vercel CLI:

vercel build
vercel deploy --prebuilt