Ray tracer written on Rust, based on the book "The Ray Tracer Challenge" by Jamis Buck.
For now it can render scene using virtual "world" and camera into .ppm image format. World can hold one light source and any number of graphic primitives.
You can apply various transformations and material settings to the object. All of these factors will affect the final pixel color in the final picture.
- Sphere
- Plane
- Cube
- Cylinder
- Cone
You can customize the scene in src/main.rs
file and then render an image using cargo run
, image file will be named scene.png
.
cargo run --release
open scene.png
- Scene loader from yaml config file
- Compile into WASM and run in the Web
- CLI
- Make rendering multithreaded
- Performance improvements and refactoring
- Chapter 01: Tuples, Points, and Vectors
- Chapter 02: Drawing on a Canvas
- Chapter 03: Matrices
- Chapter 04: Matrix Transformations
- Chapter 05: Ray-Sphere Intersections
- Chapter 06: Light and Shading
- Chapter 07: Making a Scene
- Chapter 08: Shadows
- Chapter 09: Planes
- Chapter 10: Patterns
- Chapter 11: Reflection and Refraction
- Chapter 12: Cubes
- Chapter 13: Cylinders
- Chapter 14: Groups
- Chapter 15: Triangles
- Chapter 16: Constructive Solid Geometry (CSG)