Precomputing irradiance maps and diffuse convolution
As we discussed earlier in the recipe An introduction to the glTF 2.0 Physically Based Shading Model, the second part of the split sum approximation necessary to calculate the glTF 2.0 physically based shading model comes from the irradiance cube map, which is precalculated by convolving the input environment cube map with the GGX distribution of our shading model. Our implementation is based on the code at https://github.com/KhronosGroup/glTF-Sample-Viewer/blob/main/source/shaders/ibl_filtering.frag.
Image-based lighting (IBL) is a technique for illuminating a scene using captured light information. This information can be stored as panoramic photo images (for example, see Figure 6.6). It is very hard to simulate entire real-world environments, so capturing the real world and using images is a very common technique nowadays to produce realistic renders. Using IBL allows us to precompute the parts of the diffuse and specular BRDF equations...