Day 17, Transparency and Refraction
No new pixels today, because implementing transparency and refraction turned out to be quite a lot of work. So far I’ve made all the cases where nothing happens, and the refracted ray would be black.
- The material is not transparent (trivially)
- The maximum recursion depth is reached and search is aborted
- Total internal reflection would lead to 2, but is detected early
The next step, for tomorrow, should be about finding an actual color, and viewing the world through refractive distortions.
Next related
Day 18 – 21, Feverish Shiny Glass Pixels
Previous related
Day 16, Halfway there
Fitting that the halfway point would be about reflections. Pagewise we’re more than halvway through the book, but I’m guessing that there will be plenty of things to do for the remaining 15 days. There’s still the going back and replacing the homebuilt algebra code with stdlib, if nothing else.