Integration domains and sampling for NDF

Note: This page is still quite rough / unfinished.

NDF (normal distribution function) are typically given in terms of microfacet area. To convert to macrosurface area, we need to multiple by . This is because . To get into spherical coordinates, we need to multiple by since .

Pasted image 20241108005122.png

So before creating sampling routines for an NDF, first multiply by
, the jacobian determinant of the transformation.

Quick reference:


To get a sampling routine given the PDF in spherical coordinate domain, first integrate out to get the marginal density . Then get conditional density .

Then use inverse transform sampling. For each function calculate the CDF by integration:

Finally set the CDF equal to a random variable and solve for the integration variable: