20 #ifndef ANTKEEPER_PHYSICS_LIGHT_PHASE_HPP
21 #define ANTKEEPER_PHYSICS_LIGHT_PHASE_HPP
58 return T(1) / (T(4) * math::pi<T>);
72 static const T k = T(3) / (T(8) * math::pi<T>);
74 const T num = (T(1) - gg) * (T(1) + mu * mu);
75 const T den = (T(2) + gg) *
std::pow(T(1) + gg - T(2) * g * mu, T(1.5));
83 return (T(1) - gg) / (T(4) * math::pi<T> *
std::pow(T(1) + gg - T(2) * g * mu, T(1.5)));
89 static const T k = T(3) / (T(16) * math::pi<T>);
90 return k * (1.0 + mu * mu);
consteval T pow(T x, T e) noexcept
Compile-time pow for unsigned integrals.
T henyey_greenstein(T mu, T g)
Henyey–Greenstein phase function.
T cornette_shanks(T mu, T g)
Cornette-Shanks phase function.
T rayleigh(T mu)
Rayleigh phase function.
constexpr T isotropic()
Isotropic phase function.