An eye tracking method comprising: iteratively testing different combinations of light sources of a plurality of light sources , wherein in each iteration a respective one of the different combinations of light sources is tested by: projecting light toward an eye of a user from the respective one of the different combinations of light sources ; capturing an image of the eye with a camera during projection of the respective one of the different combinations of light sources ; detecting saturated regions in the image; determining a bounding box for each core of the saturated regions; fitting a statistical distribution to each saturated region within each bounding box; classifying a saturated region within a bounding box as a glare if a parameter of the statistical distribution fit to the saturated region meets a threshold statistical distribution fit condition; determining a level of occlusion arising from a transparent or semi-transparent optical structure positioned between the eye and the camera based on number and/or locations of glares in the image; selecting the respective one of the different combinations of light sources as a suitable combination of light sources for performing eye tracking if the determined level of occlusion shows that the respective one of the different combinations of light sources produces unoccluded or partially occluded pupil glints that are obtained with a high confidence score; and ceasing the iterative testing upon selection of the respective one of the different combinations of light sources as the suitable combination of light sources for performing eye tracking; and after the iterative testing, projecting light via the selected suitable combination of light sources for performing the eye tracking. projecting light toward an eye of a user from the respective one of the different combinations of light sources ; capturing an image of the eye with a camera during projection of the respective one of the different combinations of light sources ; detecting saturated regions in the image; determining a bounding box for each core of the saturated regions; fitting a statistical distribution to each saturated region within each bounding box; classifying a saturated region within a bounding box as a glare if a parameter of the statistical distribution fit to the saturated region meets a threshold statistical distribution fit condition; determining a level of occlusion arising from a transparent or semi-transparent optical structure positioned between the eye and the camera based on number and/or locations of glares in the image; selecting the respective one of the different combinations of light sources as a suitable combination of light sources for performing eye tracking if the determined level of occlusion shows that the respective one of the different combinations of light sources produces unoccluded or partially occluded pupil glints that are obtained with a high confidence score; and ceasing the iterative testing upon selection of the respective one of the different combinations of light sources as the suitable combination of light sources for performing eye tracking; and after the iterative testing, projecting light via the selected suitable combination of light sources for performing the eye tracking. <EOS>