Code accompanying the paper "Microsurface Transformations" by Asen Atanasov, Vladimir Koylazov, Rossen Dimov and Alexander Wilkie from EGSR 2022.
In the folder derivation we provide the Mathematica notebook for the derivation of the Jacobian that ensures normalization of linearly transformed microfacet distributions.
In microsurface_transformations.h we provide the implementations of a variety of microsurfaces: GTR, Anisotropic GGX and Beckmann, STD, Phong, Sheen and Discrete GGX. In test.cpp we instantiate all of these microsurfaces with random parameters and verify that they fullfill normalization and shadowing constraints. Then these instances are transformed using random tangential transformations and the constraints are verified once again.