Skip to content

A simple multi-threaded ray tracer written in Rust

Notifications You must be signed in to change notification settings

jonapap/ray-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer Engine

This is a ray tracer engine based on the books Ray Tracing in One Weekend and Ray Tracing: The Next Week by Peter Shirley.

The engine is written in Rust, adapted from the C++ version of the book. A few changes have been made from the provided implementation:

  • Multi-Threading support
  • SAH (Surface Area Heuristic) for building the BVH tree
  • Various optimizations for improving the run-time performance

Future plans:

  • Add support for other objects
  • Add support for more textures
  • Improve performance using Monte Carlo and other methods

Build and Run

First, install the latest stable version of Rust. Next, in this folder, run:

cargo run --release -- cornell-box

This will render the Cornell Box scene and output it under ./out.png. Simply open the image using your preferred image viewer.

Other scenes are provided. Simply run the following command to see all the possible command line arguments:

cargo run --release -- --help

About

A simple multi-threaded ray tracer written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages