I don’t drive, but being a passenger and a cyclist, I imagine dazzling lights can be something of a problem to drivers.
To combat this, a camera could be mounted in the head-rest of the driver’s seat of a car, so that it was able to see what the driver saw from the same perspective. It could identify where egregious bright lights were coming from.
A liquid crystal matrix could be embedded into the windscreen. An on-board computer could calibrate the camera and the ‘screen’ built into the windscreen. It could then darken in the spots where bright light, to provide a very specialised shield and prevent dazzling.
Welders' helmets have something similar, except that the whole visor blacks out when it detects any bright light. This would cover exactly the same shape as the dazzling spot of light, leaving the rest of the windscreen transparent.