Peter Shirley's Ray Tracing Minibooks in Nim
This repo is a source port of Peter Shirley's Ray Tracing Minibooks from C++ over to the Nim language. Nim v0.15.x was used. Read a blog post about this repo here: https://16bpp.net/blog/post/ray-tracing-book-series-review-nim-first-impressions
The official repo page can be found on GitLab: https://gitlab.com/define-private-public/PeterShirley-RayTracing-Nim If you have any issues with the source code, please report issues there. Any other places that host this code should be treated as mirrors.
To build the Ray Tracers in each book, there is a
nakefile.nim defined, so you
will need the
nake utility. For best performance, I recommend running
nake release. The default build task is
I've tried to keep the source code as simple as possible, so it probably isn't
as optimized as it could be. I've also tried to keep it as close as possible to
the original source (e.g. naming conventions and structure), but a few times
I've taken liberties for the sake simplicity (e.g. see
sure to check each directory's
Please also keep in mind that I worked on these when I was still very new to the Nim language (and it's ecosystem). So it's very likely there are inefficiencies, not so great code consistancy, and other undesireables.