Bug hunting

It seems there was an error in the formula for the ray-sphere intersection calculation — after calculating a few samples and the general formula manually, I found them. This was quite surprising, because — lazy as I am — I took the formulae from a book about graphic programming. Anyway, everything seems to work now:

Next step (after simple refactoring, as always) is phong-shading.

Leave a reply