The pane is very close to the eye, so small changes are amplified if lines are extended outward into the scene being viewed.
Actually, to be more accurate, it wouldn't depend on the location of the pupil, but on the center of the eye (because the geometry is that when the eye looks in different directions, it rotates about this center). The pupil moves quite a lot, as you glance left and right.
That's going to be difficult without having internally looking cameras that monitor the pupil.
Possibly, we might want to track the pupil size, but it seems reasonable to assume it is always small, since glare is only an issue in bright light. Although, once the glare is hidden, the pupil would dilate slightly, so it's probably best to use that pupil size in the calculations.
If we wanted to cover the whole retina (not just the fovea), we'd need a much bigger blackspot. Actually, the ideal is not to have a sharply delineated spot, but a gradient, corresponding to the sensitivity of retina that it falls upon.
I was concerned that the geometry calculation requires your pupil to be at a precisely known location, but in practice, if it was off, you'd just adjust the sunglasses (and maybe the temples can be made so that you feel their position). You'd calibrate them when you first use them. Of course, the black-spot can be made a little overlarge, for margin of error.
Larry Niven (surely not the only one) mentioned this idea in Grendel (in the Neutron Star collection), a 1968 shortstory, which included [MINOR SPOILER] an update on the old fighter-pilot tactic of attacking out of the sun - which with these sunglasses, is hidden by the black-spot.