diff options
author | Thomas Dinges <blender@dingto.org> | 2014-03-10 01:19:27 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-03-10 01:20:01 +0400 |
commit | 99e20d7b8930479edfacae246a529e03b84264ae (patch) | |
tree | 9bffdd2a43d7948a864528f205eef4f3c86687b3 /intern/cycles/render/integrator.cpp | |
parent | 6fdbab43662d3f646f7d94bfaad83111f7d41830 (diff) |
Cycles: Option to Sample all Lights in the Branched Path integrator for indirect samples
This adds a new option "Sample All Lights" to the Sampling panel in Cycles (Branched Path). When enabled, Cycles will sample all the lights in the scene for the indirect samples, instead of randomly picking one. This is already happening for direct samples, now you can optionally enable it for indirect.
Example file and renders:
Blend file: http://www.pasteall.org/blend/27411
Random: http://www.pasteall.org/pic/show.php?id=68033
All: http://www.pasteall.org/pic/show.php?id=68034
Sampling all lights is a bit slower, but there is less variance, so it should help in situations with many lights.
Patch by myself with some tweaks by Brecht.
Differential Revision: https://developer.blender.org/D391
Diffstat (limited to 'intern/cycles/render/integrator.cpp')
-rw-r--r-- | intern/cycles/render/integrator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp index 5b26440594a..849157d9e91 100644 --- a/intern/cycles/render/integrator.cpp +++ b/intern/cycles/render/integrator.cpp @@ -130,6 +130,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene kintegrator->mesh_light_samples = mesh_light_samples; kintegrator->subsurface_samples = subsurface_samples; kintegrator->volume_samples = volume_samples; + kintegrator->sample_all_lights_indirect = sample_all_lights_indirect; kintegrator->sampling_pattern = sampling_pattern; @@ -197,7 +198,8 @@ bool Integrator::modified(const Integrator& integrator) subsurface_samples == integrator.subsurface_samples && volume_samples == integrator.volume_samples && motion_blur == integrator.motion_blur && - sampling_pattern == integrator.sampling_pattern); + sampling_pattern == integrator.sampling_pattern && + sample_all_lights_indirect == integrator.sample_all_lights_indirect); } void Integrator::tag_update(Scene *scene) |