Techniques are described for generating and using an illumination pattern for corneal topography. The illumination pattern is projected onto an eye of a user wearing a head-mounted assembly. The illumination pattern is based on a reference pattern and corresponds to selective illumination of dots arranged along a two-dimensional grid. An image sensor captures a reflected image produced by reflection of the illumination pattern off the eye. A reflected pattern is identified based on glints in the reflected image and mapped to the reference pattern to generate an aligned reflected pattern. An eye model including a topography of a cornea is calculated by comparing the aligned reflected pattern to the reference pattern to determine a deviation in a shape of the cornea based on a difference between the aligned reflected pattern and the reference pattern. The eye model can be applied in various ways, including for eye tracking or biometric authentication.