Yes, Shatter 5e affects all creatures within its area of effect, regardless of whether they are visible or not. The caster does not need to see the creatures, just the point where they choose to center the spell's effect.