It's all angular map though. Any idea how to sample them with ray tracing? Sample code would be helpful too

I don't think that's what I need. pbrt uses rectangular env map, not the kind in the link I posted.MohamedSakr wrote:I think you are looking for this https://github.com/mmp/pbrt-v2/blob/mas ... finite.cpp