Refration through the medium deepnd on it's refrative index and incident angle so these are the factor which will affect refraction
1) Refraction is directly proportional to the incident angle.
2) Refractive index of medium
Refractive index of medium depend on these factors
1) Speed of light in the medium (Higher the speed of light, lower is the refractive index)
2) Temperature of the medium(When the temperature of medium increases, the speed of light in the medium increases and hence the refractive index decreases).
3) Colour or Wavelength of light(Greater is the wavelength of light in the given medium, its refractive index will be less. Hence refractive index is least for red light with greatest wavelength and greatest for violet light with greatest wavelength)
4) Optical density of the medium (Denser the medium, the speed of light in the medium will be less and hence the refractive index will be more)