torbiak/gopl

The solution for 3.6 is wrong

SingularReza opened this issue · 1 comments

Instead of averaging over the subpixels, it is sampling the pixels diagonal to the one being worked on, making the end result same as the one without super sampling. Changing epsX and epsY to 1/width and 1/height would be the correct way

I tested this code, and found that due to the way the constants are initialised, epsX and epsY end up being 0, so in effect there is no supersampling performed. Explicitly initialising epsX and epsY as floats seemed to work better?