Ray Tracing Gems II available as free download
Not just "free" as in beer; free as in "Creative Commons Attribution 4.0 International License (CC-BY-NC-ND)"!  You can put the book up on your own web site!  They're a little confused, though; they specify "Creative Commons Attribution 4.0", which is CC-BY, but also "CC-BY-NC-ND", which is Attribution-NonCommercial-NoDerivatives; and then they explain, "allows you to freely copy and redistribute any chapter, or the whole book, as long as you give appropriate credit and you are not using it for commercial purposes", which would be CC-BY-NC (Attribution-NonCommercial).<p>The actual book download link seems to be <a href="https://link.springer.com/content/pdf/10.1007%2F978-1-4842-7185-8.pdf" rel="nofollow">https://link.springer.com/content/pdf/10.1007%2F978-1-4842-7...</a> for now (884 pp., 262 MB!, md5sum 0e23ade6512d9a3ffa97a17d45521563).  At the moment, the book itself claims to be CC-BY-NC-ND on the colophon page, but then later repeats the above confused text from the web page with its three conflicting licenses.<p>The book content is SUPER SWEET. :)<p>When I was a kid I was really fascinated with POVRay, but my 286 was too slow to make it very much fun.  And I sucked at programming.  A few years ago I wrote <a href="http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytracer.html" rel="nofollow">http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytra...</a> and it was <i>amazing</i>.  200 lines of C, one night of hacking, was enough to get from floating-point arithmetic, scanf, and putchar, to gorgeous glowing shining spheres.  And it took <i>under a second</i>.  On my <i>netbook</i>.  Fucking <i>magic</i>.<p>But the techniques in this book enable orders of magnitude more amazing stuff than that!<p>If you're writing this stuff in GLSL instead of C, aside from the speed, you can save about 15% of the code --- you don't have to waste 20 lines on teaching C how to do math with 3-vectors, you can write v - w instead of sub(v, w), you don't have to spend 8 lines on teaching C how to write a PPM file, and you can immediately see the results on the screen.  But parsing an input scene file is gonna be a little tougher.<p>That program is just a standard Whitted-style raytracer.  (Interestingly, Whitted works at NVIDIA now.)  More recently, I wrote a minimal SDF ray tracer instead, in Lua; it's a <i>lot</i> less code: <a href="https://gitlab.com/kragen/bubbleos/-/blob/master/yeso/sdf.lua" rel="nofollow">https://gitlab.com/kragen/bubbleos/-/blob/master/yeso/sdf.lu...</a>