The change in direction of a ray of light as it passes through two media through which light travels at different speeds.