I am trying to take either a HDR panoramic or HDR cubeMap and from that create a Lambert Irradiance environment map and a Cook-Torrence Specular environment map.
I am stuck at the proper implementation to get the samples using Hammersley and importance sampling and then placing them on my target image.
This is essentially a pre-filtering environment maps question in C#