Area light importance sampling improvement
Closed, ResolvedPublic


Turning on importance sampling on area lights increases noise on diffuse surfaces. Evaluating the area light PDF moves the sample position, which it shouldn't. This patch addresses this issue.

Stefan Werner (swerner) updated the task description. (Show Details)
Stefan Werner (swerner) raised the priority of this task from to Needs Triage.
Stefan Werner (swerner) set Type to Patch.

That's actually a good catch, but the patch is not really correct. area_light_sample does not modify the light position in this case, it is ray_quad_intersect which does this. So the patch should roughly look like:

float3 light_p = make_float3(data0.y, data0.z, data0.w);
if(!ray_quad_intersect(P, D, t, light_p, ...)
ls->pdf = area_light_sample(P, &light_p, axisu, axisv, 0, 0, false);

If you can update the patch for this and also format it by git format-patch to include proper commit authorship i'll be happy to apply it.

Bastien Montagne (mont29) triaged this task as Incomplete priority.Jul 15 2015, 9:06 PM

Found some time this morning. @Stefan Werner (swerner), the patch is now committed with the modification i've mentioned above.

Thanks for the patch! :)