The different illustrative embodiments provide a method, computer program product, and apparatus for manufacturing a scleral contact lens. A number of dimensions for the scleral lens is generated based on a shape of an eye. An alteration to a first wavefront of light caused by the first wavefront of light traveling through a pupil of the eye is identified. A modification configured to be made to a posterior surface of the scleral lens is generated based on the alteration. The modification removes the alteration for a second wavefront of light traveling through the scleral lens and the pupil of the eye.