Skip to content

Ray Tracer Mini written in Rust following the Ray Tracing in One Weekend book series by Peter Shirley

License

Notifications You must be signed in to change notification settings

rsdlt/ray-tracer-mini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer Mini

A simple ray tracer written in Rust following the Ray Tracing in One Weekend book series by Peter Shirley.

The ray tracer generates a random scene filled with spheres and leverages Rayon to deliver parallel computations.

An image with the following configurations renders in ~382 seconds in a Core i7-12700H spawning ~20 threads:

  • W x H: 1200 x 800
  • Samples per pixel: 500
  • Recursion depth: 50
  • Shapes: 486

Final Ray Traced Image

Motion Blur and Checkered Textures:

  • W x H: 800 x 450
  • Samples per pixel: 400
  • Recursion depth: 70
  • Shapes: 486
  • Render time: 21 minutes

Ray Trace Motion Blur

Progress bar indicator:

Progress Bar Indicator

Usage:

  1. Build project: cargo build --release.
  2. Configure ray tracer:
    • Edit config.toml to set image width, image height, recursion depth, samples per pixel and scene to be rendered.
    • Copy config.toml to target directory target/release.
  3. Render image: ./target/release/app.
  4. View image: ./target/release/image.ppm.

About

Ray Tracer Mini written in Rust following the Ray Tracing in One Weekend book series by Peter Shirley

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages