https://github.com/miou-zora/zaytracer
  
  
    Raytracer in Zig 
    https://github.com/miou-zora/zaytracer
  
graphics-programming nix nix-flake qoi raytracing zig
        Last synced: 3 months ago 
        JSON representation
    
Raytracer in Zig
- Host: GitHub
 - URL: https://github.com/miou-zora/zaytracer
 - Owner: Miou-zora
 - License: mit
 - Created: 2024-04-15T18:35:15.000Z (over 1 year ago)
 - Default Branch: main
 - Last Pushed: 2025-04-23T13:19:45.000Z (6 months ago)
 - Last Synced: 2025-04-23T13:25:06.854Z (6 months ago)
 - Topics: graphics-programming, nix, nix-flake, qoi, raytracing, zig
 - Language: Zig
 - Homepage:
 - Size: 3.9 MB
 - Stars: 5
 - Watchers: 2
 - Forks: 2
 - Open Issues: 1
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE
 
 
Awesome Lists containing this project
README
          # Zaytracer (Raytracer in zig)

## :bookmark_tabs: Requirements
- :cherry_blossom: zig 0.14
## :zap: Usage
### :construction_worker: Building
#### Release
```sh
zig build -Doptimize=ReleaseFast
```
#### Debug
```sh
zig build
```
### :rocket: Running
#### With `zig build` or `zig build -Doptimize=ReleaseFast`
```sh
# It will build the project and run it. (do nothing if the project is already built)
zig build run
# or you can run the executable directly
./zig-out/bin/Zaytracer
```
## Perf
### Performance measures
To take performance measures you can use th perf tool like this:
```sh
perf record -g ./Zaytracer
perf report -g 'graph,0.5,caller'
```
You will need a debug build for that, else you won't have debug symbols.
### Time measures
You can use the hyperfine tool to measure the time of execution of the program.
After `zig build -Doptimize=ReleaseFast`:
```sh
hyperfine "./zig-out/bin/Zaytracer" --warmup 10
```