Reference: https://raytracing.github.io/books/RayTracingInOneWeekend.html
Zig version: 0.13.0
git clone https://github.com/srikarboga/rayzig.git
cd rayzig
zig run main.zig > out.ppm
It takes about 10 mins to render with a ryzen 5900x cpu with the default settings which can be changed in camera.zig
. After which you can view the image in a ppm viewer of your choice. If you have the kitty terminal you can use kitten icat out.ppm
to view it.
The code for this project could use a lot of improvements since it was my first project in this language. Goals for the future are to refactor and clean up the code and add multithreading.