Optimal sampling of visual information for lightness judgments