Improved Environment Sampling
Given the desert setting of my render, I knew that I would strongly benefit from being able to sample environment maps with a visible sun, which the default implementation in lightwave struggles with because the sun is incredibly bright but also covers a very small area of the environment map, which makes sampling it by chance very unlikely, leading to a high variance in samples.
My implementation closely follows the relevant section in the PBRT book. In the beginning I had a hard time understanding the idea behind the sampling algorithm using a piecewise-constant 2D-function. It was only after I watched the video Sampling of Environment Maps for Image-based Lighting by the YouTube channel GSN Composer that I understood the algorithm, because the video includes images of the conditional and marginal probabilities of a given environment map, which allowed me to visualize the procedure in my head. I did not take any code from that video though. I just used it as an introduction to the topic before returning to PBRT to re-read the chapter.
Sadly, my implementation still does not work. I am pretty sure that sampling the UV-coordinates works, and suspect that the error lies somewhere in the conversion to cartesian coordinates and the calculation of the final weight, but I was not able to solve the problem before the deadline.
Therefore, this sampling approach was not used for my render.