corrected z interpolation to use pixel centers