https://github.com/k0nserv/rusttracer
A raytracer written in Rust for fun and learning
https://github.com/k0nserv/rusttracer
rayon raytracer raytracing rust
Last synced: over 1 year ago
JSON representation
A raytracer written in Rust for fun and learning
- Host: GitHub
- URL: https://github.com/k0nserv/rusttracer
- Owner: k0nserv
- License: mit
- Created: 2017-03-09T22:39:05.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-06T14:01:04.000Z (about 2 years ago)
- Last Synced: 2025-02-27T19:04:01.024Z (over 1 year ago)
- Topics: rayon, raytracer, raytracing, rust
- Language: Rust
- Homepage:
- Size: 1.45 MB
- Stars: 35
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Rusttracer

YAR(Yet Another Raytracer).
I like to write raytracers to learn new programming languages. They're fun and are a natural way to learn most OOP languages. Naturally I'm writing a raytracer in rust called rusttracer 🙂.
## Building
Make sure you have the rust nightly toolchain installed then run
```bash
cargo build --release
```
## Running
The project uses a json based configuration format. For an example see the [`rgb-spheres.json`](scenes/rgb-spheres.json) scene. To render it run:
```bash
target/release/rusttracer --config-path scenes/rgb-spheres.json
```
## Usage
```bash
Usage: target/release/rusttracer [options]
Options:
-c, --config-path CONFIG_PATH
config file path, uses `default.json` if not specified
-b, --benchmark Benchmark by rendering the scene multiple times
-h, --help prints this help menu
```
## Renders

> This was the first render produced.

> This was rendered a while later, at this point there was support for diffuse colors, specular highlights, reflection, colored lights, and super sampling. This is 2560x1440 at 4x4 super sampling

> This rendering uses procedural textures to render the fractal artworks. This is 2560x1440 at 4x4 super sampling.