Sampling of Environment Maps for Image-based Lighting [Shaders Monthly #13]

In Episode #13 of Shaders Monthly, we talk about importance sampling of environment maps for image-based lighting. We cover the theory and implement a chain of GLSL shaders. Here is the code of the created shaders: GSN Composer: https://www.gsn-lib.org/index.html#pr... C++: https://www.mathematik.uni-marburg.de... Java: https://www.mathematik.uni-marburg.de... Documentation for the shader plugin node of the GSN Composer: https://gsn-lib.org/docs/nodes/Shader... Further reading: Matt Pharr and Greg Humphreys: "Monte Carlo Rendering with Natural Illumination." University of Virginia Dept. of Computer Science Tech Report (2004) https://doi.org/10.18130/V3C484 00:00 Introduction 03:38 Refreshers 06:20 Approach 15:45 Step 1. Grayscale 22:29 Step 2. 2D PDF 30:59 Step 3. Marginal PDF 32:17 Step 4. Conditional PDF 34:15 Step 5. Inverse Transform Sampling 40:41 Step 6. Evaluate the Rendering Equation Source for HDR environment maps that are used in this video: https://polyhaven.com/hdris