Leadwerks #1 Take an average of the samples along the horizontal and vertical lines, then add the results and divide by two. This will require n+n reads instead of n*n.