Expand description

When light is incident on the surface, the surface scatters the light, reflecting some of it back into the environment. There are two main effects that need to be described to model this reflection: the spectral distribution of the reflected light and its directional distribution.

Structs

Enums

Functions

Utility function to calculate the absolute value of the cosine via spherical coordinates.

Utility function to calculate square cosine via spherical coordinates.

Utility function to calculate the square cosine via spherical coordinates.

Utility function to calculate the cosine of the angle between two vectors in the shading coordinate system.

Utility function to calculate cosine via spherical coordinates.

Utility function to calculate cosine via spherical coordinates.

Computes the Fresnel reflectance at the boundary between a conductor and a dielectric medium.

Computes the Fresnel reflection formula for dielectric materials and unpolarized light.

Computes the reflection direction given an incident direction and a surface normal.

Computes the refraction direction given an incident direction, a surface normal, and the ratio of indices of refraction (incident and transmitted).

Utility function to calculate square sine via spherical coordinates.

Utility function to calculate the square sine via spherical coordinates.

Utility function to calculate sine via spherical coordinates.

Utility function to calculate sine via spherical coordinates.

Utility function to calculate the square tangent via spherical coordinates.

Utility function to calculate the tangent via spherical coordinates.

Check that two vectors lie on the same side of of the surface.