a friend of mine told me the other day “i will one day write a raytracer myself”.
then i realized that a simple raytracer can be written in a matter of minutes. indeed, as with everything in live, repetition brings fluency. even for writing a raytracer. i think this is my 50th or so raytracer i write (if not more). of course, not all of them were BIH based out-of-core packet tracers, but simple ones, not far from the one i improvised during this short live coding session yesterday.
note that sometimes i got stuck cause i didn’t have syntax error logs, and i also had to deduce the intersection functions on the fly. but there it is, white sphere on a plane with some interesting shading on it. you can follow the process of creating the tracer, step by step. it’s rudimentary, it renders slow and it designed wrongly… but it’s fast to develop and easy to follow. so, i hope you enjoy it!