Homework 2 - Part 3: Refraction

In the last part of the second assignment, we are expected to introduce Refraction for the objects which have transparent material(dielectric). A transparent material refracts and reflects the light according to refractive index of two mediums and angle of the light. In my implementation, I followed the calculations which were shared at the lecture. They can also be found in "Fundamentals of Computer Graphics 3rd Edition" (Shirley, and Marschner, 2009). When a reflection happened, I increased current recursive step. Also, I didn't let any reflection happen, if max recursive depth is reached. On the other hand, I didn't change current recursive step for the transmitted ray, since it is just refracted version of the incoming ray. - cornelbox_glass.xml (100 samples for each pixel) [bilaly@Kalimdor | 23:34:59 | HW2]$ ./raytracer ../scenes/cornellbox_glass.xml Scene is parsed Starting rendering on #8 thread(s) cornellbox_glass.png(800x800) is saved in: 1...