This week I was able to test the accuracy of my renderer using Disney’s BRDF Explorer. It was able to pinpoint some bugs and helped to explore how the implementation compared to Disney’s references.
When looking at the objects rendered I could tell that something was wrong but was unsure as to what was causing the issue. I had heard of the BRDF viewer so wanted to give it a go. When comparing the functions I was able to tell that my implementation wasn’t properly responding to changes in view. I was able to quickly find that I had used the normal instead of the view-direction to calculate the half vector used in the calculations. After fixing this issue I was able to properly compare the different functions to ensure my implementation was accurate. The Disney principled BRDF is a slightly more complex version of the function I was using, but with the correct parameters, the functions were almost identical. Below is a GIF demonstrating the comparison between the two functions.
Here we can see the almost identical response to the change in incident angle. My implementation is shown in green while Disney’s is in red. The minor differences can be put down to the slightly different terms used in each function. However, the plot demonstrates the traits I expected from my BRDF. Below are plots for each of the different terms used in each function changing based on material roughness and view angle.
Here you can see that the two distribution terms match identically for changing roughness values.
Here the values are offset slightly to make each plot visible. Mine is shown in purple while Disney’s is in blue. You can see how both functions show the exact same response as the angle of incidence approaches 90 degrees.
Here you can see quite major differences in the two geometry terms used. Mine is shown in purple and Disney’s in red. They are both using the Smith-GGX approximation. However, Disney’s function remaps roughness into the [0.5, 1] range. Why it does this I am unsure, it is likely down to a visual preference. Often there isn’t a single correct choice and it is often down to which appears more perceptually correct. I will continue to mess around with these functions on lit objects to determine which I prefer. I will not spend too much time on this, as the difference is very marginal.