Bug in the Progressive Photon Mapping implementation

There is a bug in the PPM implementation during the direct radiance sampling, as far as I can see. There is a missing divide by pi, which makes the direct light much brighter than the indirect light.

Could you point to the place in the code where you think it is missing?

I believe light_atten should be divided by PI, around line 214 in ppm_gather.cu. The main reason for this is that if you use the photons for direct illumination as well (remove the if in the diffuse shader), it will be darker, unless I have somehow messed up the sample code.