Refraction: light changes direction of propagation when entering a material with a different refractive index.

![enter image description here](https://i.stack.imgur.com/E0Xwq.jpg)

Does the direction of propagation of light change **sharply** and almost instantaneously (as shown in the diagram) or smoothly?