A rudimentary raytracer in Rust.
- Working raytrace implementation with basic shapes
- Different shading materials with Lambert, Metal and Glass
- Scene, Camera and Render API
- Shapes including Planes, Spheres, Triangles, Disks and Rectangles
- Antialiasing, gamma correction and working aspect ratio
- Depth of field with aperture and focus distance settings
Updated as of 12/13/2018
- Add an Axis-Aligned Bounding Box system (AABB tree collision detection)
- Add in mesh-based intersections to be able to read .OBJ format
- Voxel-raytracing
- Multi-threading with multiple-producer single-consumer
- Adding in .X3D format support to import Blender export data
- Lights, including spot-lighting and ambient lighting
- Camera animation / rendering multiple frames
This raytracer library is broken up into several smaller modules to modularize it as much as possible.
raytracer::math
contains all raw math functions and libraries for computing 3-dimension vectorsraytracer::geometry
contains all shapes and AABB-related toolsraytracer::shading
contains lights and materialsraytracer::rendering
contains tools for creating and rendering scenes
Clone and run the code with
git clone https://github.com/sleibrock/rust-raytracer
cd rust-raytracer
cargo run
Cargo must be installed as well as a Rust toolchain. For installing Rust, please visit Rustup