PBR Part 3: The Radiance Integral

Took a few more days than I expected, but now let's jump right into it. This is a direct continuation of the last post about Image-Based Lighting. So, we need a PMREM for the indirect specular lighting. But the CubeMapGen tool that we've been using doesn't support the Cook-Torrence Microfacet model that's being used. So, the math for that has to be done manually. What we need to do is solve an equation called the radiance integral, shown below: This can be solved with a techn