This repository contains a few very simple raytracer implementations written in Rust. They are listed here in increasing order of complexity:
-
raytracer_2d.rs
: The simplest possible (?) raytracer that produces a 2D image with orthographic projection. -
raytracer_pinhole.rs
: Similar toraytracer_2d.rs
but now we use a pinhole camera model for capturing the image. Also added a light source and implemented simple phong shading. -
raytracer_pinhole_path.rs
Implements path-based ray tracing by recursively following rays up until a maximum depth of 4. Rays are sampled randomly using a monte-carlo based approach.5k samples 10k samples
The code is inspired by the book Realistic Ray Tracing (2nd Edition) by Peter Shirley and R. Keith Morley and the smallpt project.