Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/corrieriluca/raytracing-in-rust
Simple ray tracer made in Rust based on Peter Shirley's book "Ray Tracing in One Weekend".
https://github.com/corrieriluca/raytracing-in-rust
raytracing-one-weekend rust
Last synced: about 1 month ago
JSON representation
Simple ray tracer made in Rust based on Peter Shirley's book "Ray Tracing in One Weekend".
- Host: GitHub
- URL: https://github.com/corrieriluca/raytracing-in-rust
- Owner: corrieriluca
- License: cc0-1.0
- Created: 2021-09-26T20:46:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-07T13:09:58.000Z (over 2 years ago)
- Last Synced: 2023-03-04T00:43:24.093Z (almost 2 years ago)
- Topics: raytracing-one-weekend, rust
- Language: Rust
- Homepage:
- Size: 84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ray Tracing in Rust
Simple path tracer made in Rust based on Peter Shirley's book
[_Ray Tracing in One Weekend_](https://raytracing.github.io/books/RayTracingInOneWeekend.html).To-do:
- [x] _Ray Tracing in One Weekend_ (actually in more than one weekend...)
- [x] Refactor the code
- [x] Command line arguments
- [x] Progress bar
- [x] Parallelism (multithreading)
- [x] Save to a better image format (BMP)
- [ ] Load .obj files## Usage
As stated in the `./.cargo/config.toml` file, this package use the `rustc` flag
`-Ctarget-cpu=native` (which can be seen as equivalent to `gcc`/`clang`'s `-march=native` flag).
Thus for better performance, the produced binary should be run on the same machine
on which it has been compiled.```
$ cargo build --release
$ ./target/release/raytracing_in_rust --help
Raytracing in Rust 0.1.0USAGE:
raytracing_in_rust [FLAGS] [OPTIONS]FLAGS:
-d, --debug Print debug information
-h, --help Prints help information
-p, --parallel Use multithreading for rendering
-V, --version Prints version informationOPTIONS:
-j Number of threads to spawn. Default is number of logical coresARGS:
Where to save the result (BMP file)
```