The culprit that caused the illusion in the desert

Total internal reflection is what causes the illusion of seeing water in the desert or on a road surface on a hot day.

The culprit that caused the illusion in the desert
Seeing water in the desert is an illusion that occurs due to the temperature difference between the air layers.

Seeing water in the desert or on the road on a hot day is an illusion that occurs due to the temperature difference between the air layers.

The closer the layer of air is to the ground, the hotter it gets, the cooler it gets the higher you go.

The heated air will expand causing the refractive index to decrease. The upper layer of air is cooler and denser, so it has a higher refractive index.

The difference in refractive index causes light to bend. The closer to the ground, the higher the angle of incidence of the light ray. When the angle of incidence exceeds the value of the limiting angle of refraction, total internal reflection occurs, causing the light to shift upward and reach the eye.

Our eyes look in a straight line, resulting in the reflection of the sky on the ground creating an illusion that resembles a puddle.