There seems to be a bug in the mapping from roughness and anisotropy to the GGX parameters $a_t$ and $a_b$, or a misassumption about the characteristics of the resulting values.
The spec text says the following:
The NDF terms $a_t$ and $a_b$ are more conveniently parametrized as the total roughness $r$
and an anisotropy $a∈[0,1]$. We specify the following mapping from $r$ and $a$ to $α_t$, $α_b$:
$a_t=r^2\sqrt{\frac{2}{1+(1-a)^2}}$ and $a_b=(1-a)a_t$.
This formulation satisfies $α^2_t+α^2_b=2α^2$, to preserve the average roughness regardless of the anisotropy.
First, there seems to be a typo in the formula that should be satisfied. The text says that the average roughness should be preserved, but the formula uses $a$ instead of $r$: $2a^2$ -> $2r^2$.
Second, when solving the left side of the formula by inserting the definitions of $a_t$ and $a_b$ one gets $a_t^2+a_b^2 = 2r^4$.
The result does not seem to be related to an average roughness.
To get something that fulfills the goal of a mapping that matches the average roughness, the mapping needs to be:
$a_t=r^{1/2}\sqrt{\frac{2}{1+(1-a)^2}}$ and $a_b=(1-a)a_t$.
and then the following would hold:
$a_t^2+a_b^2 = 2r$.
There seems to be a bug in the mapping from roughness and anisotropy to the GGX parameters$a_t$ and $a_b$ , or a misassumption about the characteristics of the resulting values.
The spec text says the following:
First, there seems to be a typo in the formula that should be satisfied. The text says that the average roughness should be preserved, but the formula uses$a$ instead of $r$ : $2a^2$ -> $2r^2$ .$a_t$ and $a_b$ one gets $a_t^2+a_b^2 = 2r^4$ .
Second, when solving the left side of the formula by inserting the definitions of
The result does not seem to be related to an average roughness.
To get something that fulfills the goal of a mapping that matches the average roughness, the mapping needs to be:
$a_t=r^{1/2}\sqrt{\frac{2}{1+(1-a)^2}}$ and $a_b=(1-a)a_t$ .
$a_t^2+a_b^2 = 2r$ .
and then the following would hold: