Simple Raytracer for simple 3D scenes, made in Rust. Objective is to learn Rust, not make a very good raytracer.
- Monte Carlo raytracer with adaptive sampling (based on z-test confidence interval)
- Anti aliasing using Sobol sequence and Mitchell Netravali filter
- Weigthed importance sampling using Probability Distribution Functions and attractors (e.g. lights)
- Various primitives (triangle, quad, sphere)
- Various materials (Lambertian, Metal, Glass, ...)
- Bounded Hierarchy Volumes (BHV) tree, constructed using Surface Area Heuristic (SAH), to accelerate intersection tracing
- Parallel multi-threaded rendering using Rayon
- Gamma correction
- Configurable depth of focus
- Scene and configuration input from JSON
- ...
Render of different objects (cube, sphere, .obj file import (100k triangles) and materials (lambertian, glass, fuzzy metal). This render of 1200x1200 pixels with 2000 samples per pixel took about 30 minutes to complete on MacBook Air M2
- BRDF materials
- modules, imports, external crates
- ownership/references/borrow, explicit lifetimes
- methods, enums, structs
- generic methods
- traits
- basic iterators, match statement
- Result, Error, Option
- reading files, saving files
- logging, .env
- tests, benchmarking, flamegraph
- VSCode debugger, breakpoints and memory inspector
- Git(hub)
- Raytracing in One Weekend (https://raytracing.github.io/books/RayTracingInOneWeekend.html)
- PBR book (https://www.pbr-book.org)
- Raytracer in Rust (https://github.com/dps/rust-raytracer)
- Raytracer in Rust (https://bheisler.github.io/post/writing-raytracer-in-rust-part-1/)
Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.