Skip to content

gz/rust-raytracer

Repository files navigation

Raytracers in Rust

Build Status

This repository contains a few very simple raytracer implementations written in Rust. They are listed here in increasing order of complexity:

  1. raytracer_2d.rs: The simplest possible (?) raytracer that produces a 2D image with orthographic projection.

  2. raytracer_pinhole.rs: Similar to raytracer_2d.rs but now we use a pinhole camera model for capturing the image. Also added a light source and implemented simple phong shading.

  3. 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.

About

Raytracers in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages