A bug in optixPathTracer.cu in optix7 sample code ?

It seems code at line 395 in optixPathTracer.cu is not physically correct. But I’m not quite sure.
Should it be

prd->radiance = light.emission * weight;

instead of

prd->radiance += light.emission * weight;

It seems radiance at an early stage is accumulated multiple times by mistake.

Hey, yep, you’re right, that’s a bug. It over-counts the indirect rays. Thanks for letting us know, we will get it corrected.


David.