file
material.cppMaterial and fresnel utility functions.
Functions
- auto fresnel_dielectric(float cos_theta_i, float ext_ior, float int_ior) -> float
- Calculates the unpolarized fresnel reflection coefficient for a dielectric material.
- auto refract(const Vec3f& v, const Vec3f& n, float eta, Vec3f& refracted) -> bool
- Generates a refracted direction, assuming refraction is possible based on the incident direction and refractive indices.