Direction depends on the optical properties
At an oblique boundary from air to water, light slows and bends toward the normal. From water to air, it bends away when a transmitted ray exists. Use refractive index rather than assuming mass density alone predicts every material’s optical behaviour.

