A method, including illuminating an eye with light from a light source (62) so as to cause a first image (80) of the light source to be formed on a retina (78) of the eye. The method also includes capturing the light returning from the retina with a sensor (148) so as to receive at least a portion of a second image (130) of the first image on the sensor, and analyzing a signal from the sensor in order to determine a gaze direction of the eye.