It is constant within the medium. You want to look at the refractive index (n). In air, n=1. In a prism, it depends on the glass but generally, the more dense the medium the higher the refractive index (water: n=1.33 or something). I'm not sure about exactly at the point where the light bends...