Enabling gaze-contingent accommodation in presbyopia correction and near-eye displays