This repo consists of a Rust implementation of the tinyraytracer walkthrough by professor Dmitry V. Sokolov. For a tinyrenderer Rust implementation, check the tinyrenderer_rs repo.
- image 0.24.5: Image loading and manipulation
- piston_window 1.127.0: Window to display rendered frames
- obj-rs 0.6: To retrieve information from .obj files
- nalgebra 0.31.4: For vector and matrix calculations
To run, just clone any of the branches and execute cargo run --release
. If the branch requires some assets, execute:
cargo run --release <assets directory>
where <assets directory>
is the directory in which the corresponding assets (like the env map or obj model) are. For example, to run Step 10a you must clone the branch and execute:
cargo run --release assets/
At the moment, if you want to use other assets, you would have to modify the respective assets names in main.
Write to an image buffer and render it in a window.
Branch: Step_1
Basic ray tracing for single sphere.
Branch: Step_2
Add more spheres. Add basic materials support.
Branch: Step_3
Add diffuse lighting to scene objects.
Branch: Step_4
Add specular lighting to scene objects.
Branch: Step_5
Add shadows computation to scene objects.
Branch: Step_6
Add reflections computation to scene objects.
Branch: Step_7
Add refractions computation to scene objects.
Branch: Step_8
Add finite and infinite plane primitives support.
Branch: Step_9
Add environment mapping support.
Branch: Step_10a
Add support for triangle primitives. Use that to render .obj models.
Branch: Step_10b