2D sampling functions: bilinear and nearest-neighbour