Function refract

Source
pub fn refract(uv: Vec3, n: Vec3, etai_over_etat: f64) -> Vec3
Expand description

Computes the refraction vector (Snell’s law).

uv: unit incident direction, n: unit normal pointing outward from the incident medium, etai_over_etat: η/η’.