The effect of glare on visibility depends on spatial frequency