Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thekorn/raytracing-zig
Raytracing in one wekend in zig
https://github.com/thekorn/raytracing-zig
raytracing-in-one-weekend
Last synced: about 1 month ago
JSON representation
Raytracing in one wekend in zig
- Host: GitHub
- URL: https://github.com/thekorn/raytracing-zig
- Owner: thekorn
- Created: 2023-10-15T07:58:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-16T15:56:02.000Z (7 months ago)
- Last Synced: 2024-06-16T17:22:15.599Z (7 months ago)
- Topics: raytracing-in-one-weekend
- Language: Zig
- Homepage:
- Size: 493 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raytracing in one Weekend in Zig
Read the book at:
https://raytracing.github.io/books/RayTracingInOneWeekend.html## requirements
- Zig >= 0.13.0
## render the scene
```bash
$ zig build run && open out.ppm
```## unit testing
```bash
$ zig build test --summary all
```## convert the result to png
```bash
$ docker run -v $(pwd):/imgs \
dpokidov/imagemagick /imgs/out.ppm /imgs/current.png
```## build options
```bash
$ zig build -Doptimize=ReleaseFast
$ zig build -Doptimize=ReleaseSmall
```## Benchmarking
```bash
$ hyperfine -N --warmup 3 './zig-out/bin/raytracing-zig'Benchmark 1: ./zig-out/bin/raytracing-zig
Time (mean ± σ): 151.5 ms ± 3.4 ms [User: 147.4 ms, System: 1.9 ms]
Range (min … max): 149.4 ms … 163.4 ms 20 runs
```## Current rendering
![curret rendering](./current.png)
## References
* https://github.com/ryoppippi/Ray-Tracing-in-One-Weekend.zig
* https://github.com/jpaquim/raytracing-zig