Skip to content

stevenhuyn/rusty-raytracing-weekend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rusty-raytracing-weekend

Following Ray Tracing in One Weekend to make a CPU raytracer but in Rust!

Final render of book 2

Progress:

  1. Completed: Ray Tracing in One Weekend - Completed Code Here
  2. Completed: Ray Tracing: The Next Week
  3. Not Started: Ray Tracing: The Rest of Your Life
  4. Not Started: Web port with wasm using wasm-bindgen and wasm-bindgen-rayon (?)

Goals

  • Learn idiomatic Rust
  • Find out what happens if you're inside a perfectly spherical mirror

Running

Render and show in window with default sizing 400 x 225:

cargo run --release

Render in FHD resolution, headless and save file with filename FHD.png:

cargo run --release -- -w 1920 -h 1080 -i -s -f "FHD.png"

See options:

cargo run --release -- --help

Dependency breakdown

  • clap - Command line interface Parser
  • glam - 3D math library, using it so I didn't have to implement vec operations
  • pixels - Draw our vec<RGB value> (pixels) to window
  • winit - Cross platform window manager/event handler
  • rayon - Literal black box magic that multithreads ya code
  • image - Image encode/decoder, used just to encode and save our vec<RGB value> as a png

About

Ray Tracing in One Weekend, in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages