The magic trick demonstrated in the video above only works because of lights unique characteristics. When light travels through different mediums such as glass and water, the light bends, this is called refraction. The light is both reflecting and refracting as it passes through the mediums of air, water and glass. Glass and air have a relatively close index of refraction which decribes how much the light bends. So, when light passes through the air and the empty glass it goes from a low refractive index to a medium of higher refractive index, though the refraction we can see is very minimal as they both bend towards the “normal”. When water is added to the glass the rays of light now have to travel through the air (index of refraction: 1) then through the glass (~1.6) now it must go through the water (~1.3) which has a lower refractive index causing the light to bend away from the “normal”, causing the image to inverse laterally as it reflects back. You can see this many times in the video above as water is added.