The design of framework references "Realistic Ray Tracing" by Peter Shirley and R. Keith Morley

This is an image (512x512) of adaptive sampleing with 2 levels of subdivision

adaptiveSampled_correct.png
Running time: 15 + 51 seconds

This is super sampled image (512x512) of an original 1024x1024 image

sampled_result.png
Running time: 57 seconds


This is a raw image (512x512), without any sampling.

unsampled.png
Running time: 15 seconds


Here are the zoomed in comparisons of the three:
zoomed_adaptive.png zoomed_super.png zoomed_unsampled.png

Here's a bug I spent a lot of time on: For some reason, when I try to make parametric spheres, I keep getting wrong results, the color "leaks" from the spheres as the image below. I'm thinking I didn't calculate the normal correct or something, but in the previous homework, they look fine(as the one above it). I'm still debugging it.

wrong.png

adaptiveSampled_wrong.png
I fixed the bug!!!!! The problem was I forgot to normalize the direction of my rays when I did the adaptive sampling. Here is a correct parametric sphere image:

adaptiveSampled_correct.png