Cycles: multiple importance sampling for lamps, which helps reduce noise for
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 9 Jan 2013 21:09:20 +0000 (21:09 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 9 Jan 2013 21:09:20 +0000 (21:09 +0000)
commitad10cbf04aed17c69ccd4e15921669d18ed987e1
tree9a73793ecd3932a5e9a603bc13027078752f6700
parent97d1abfe95281de3e42fb9a8d13226c621fdede5
Cycles: multiple importance sampling for lamps, which helps reduce noise for
big lamps and sharp glossy reflections. This was already supported for mesh
lights and the background, so lamps should do it too.

This is not for free and it's a bit slower than I hoped even though there is
no extra BVH ray intersection. I'll try to optimize it more later.

* Area lights look a bit different now, they had the wrong shape before.
* Also fixes a sampling issue in the non-progressive integrator.
* Only enabled for the CPU, will test on the GPU later.
* An option to disable this will be added for situations where it does not help.

Same time comparison before/after:
http://www.pasteall.org/pic/show.php?id=43313
http://www.pasteall.org/pic/show.php?id=43314
intern/cycles/blender/blender_object.cpp
intern/cycles/kernel/kernel_camera.h
intern/cycles/kernel/kernel_emission.h
intern/cycles/kernel/kernel_light.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/osl/osl_shader.cpp
intern/cycles/render/light.cpp
intern/cycles/util/util_math.h