Snell's Law describes how electromagnetic waves change direction at the interface between two mediums with different IR; thus bubbles can be identified from the accompanying refraction and internal reflection even though both the immersed and immersing mediums are transparent.