# Quantum mechanics of refraction and reflection? [duplicate]

I learnt that light bends when passing through different mediums is due to the epsilon which is how much the strength of electric and magnetic field in the direction of travel changes in the material, however I am interested in quantum mechanics to explain this bending instead of Maxwell's equation? I read that electron emits photon in any direction so maybe polarisation to guide the some photon at some angle in glass as well as some away from glass?