Strange behavior anti-aliasing filter ray tracer

I have a simple ray tracer implemented in C++. What I am doing is implementing an anti-aliasing filter as explained here at page 230:

I am using a 4×4 grid with 16 regular samples but the result is a bit weird:

normal ray tracer

enter image description here

ray tracer with anti-aliasing

enter image description here

I can’t figure out why I have this kind of problem.. may you help me? thanks in advance!

Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.