https://github.com/cestef/raytracing-rust
Just a basic multithreaded raytracer
https://github.com/cestef/raytracing-rust
Last synced: 12 days ago
JSON representation
Just a basic multithreaded raytracer
- Host: GitHub
- URL: https://github.com/cestef/raytracing-rust
- Owner: cestef
- Created: 2023-06-22T16:56:01.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-14T18:03:17.000Z (over 2 years ago)
- Last Synced: 2025-02-23T05:28:02.071Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 8.94 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raytracing in Rust
This is just a raytracer written in Rust. It is based on the book [Ray Tracing in One Weekend](https://raytracing.github.io/books/RayTracingInOneWeekend.html) by Peter Shirley.
## Features
- Shapes:
- [x] Spheres
- [x] Planes
- Materials:
- [x] Lambertian
- [x] Metal
- [x] Dielectric
- [x] Antialiasing
- [x] Positionable camera
- [x] Depth of field
- [x] FOV
- [x] Gamma correction
- [x] Triangle mesh support
- [x] Multithreading
- [x] Load balancing
- [x] Beautiful CLI
- [x] Multiple file formats (JPG, PNG, PPM)
- [x] Bounding Volume Hierarchies Optimisation
- [ ] Rendering to a window
- [ ] Textures
- [ ] Importing models
- [ ] Lights
## Running
The help page can be accessed by running the program with the `--help` flag.
```bash
cargo run --release -- --help
```
This will print the following:
```
$ cargo run --release -- --help
A raytracer written in Rust.
Usage: ray-tracing-rust [OPTIONS]
Options:
-w, --width [default: 2560]
-h, --height
-a, --aspect-ratio [default: 16/9]
-s, --samples [default: 100]
-t, --threads [default: 8]
-o, --output [default: output.ppm]
-f, --fov [default: 90]
--open
-h, --help Print help
-V, --version Print version
```
Example:
```bash
cargo run --release -- -w 1920 -h 1080 -s 1000 -t 8 -o output.ppm
```