Introduction
I am implementing anisotropic GGX BRDF and have encountered strange behaviour of my implementation. I thought that if I compare the microfacet distribution function I have with the one of an isotropic GGX, then they should be equal when the anisotropy parameter is 0. I haven't been able to do that, though.
Here is the GGX formula I have used:
Here is the anisotropic GGX formula I have used:
If anisotropy is 0, then is equal to , therefore I can get the following from the second formula:
Problem 1
The problem now is that the third formula can never match the first one because of the negative 1 in the first one.
Problem 2
The specific issue I have when rendering using my anisotropic GGX is that the normals seem to be ignored in the result.
Here is a visualization of the distribution function of isotropic GGX on a flat material patch with normal mapping:
And here is the anisotropic one:
Notation
To complete the explanation of my solution, I use for the half-vector, for the normal, for roughness, for the tangent and for the bi-tangent (in my case these are simply aligned with the x and y axes respectively). and represent roughness in the corresponding directions.
Questions
- Is there a mistake in my reasoning? Is my anisotropic GGX correct?
- What is the relationship between the two? Is there a simple explanation for the extension from GGX to anisotropic GGX?
- Do you have any general tips for verifying the correctness of one's BRDF implementation?
References
Here are my main references: