Expand description
Lightweight Vec3 helper functions used throughout the BRDF library.
Functionsยง
- cartesian_
to_ spherical - Cartesian to spherical (theta, phi).
- dot_
clamp - Dot product, clamped to
[0, 1]. - dot_
clamp_ eps - Dot product, clamped to
[0 + epsilon, 1]to avoid division by zero. - orthonormal_
basis - Construct a local orthonormal basis (tangent
t, bitangentb) from surface normalnusing the Duff et al. 2017 method. - reflect
- Reflect
varoundn. - refract
- Refract
vthrough a surface with relative IOReta. ReturnsNoneon total internal reflection. - saturate
- Saturate (clamp to [0, 1]).
- schlick_
scalar - Schlick Fresnel approximation (scalar version).
- spherical_
to_ cartesian - Spherical direction to cartesian.