diff options
author | Thomas Dinges <blender@dingto.org> | 2014-02-11 00:44:49 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-02-11 00:46:02 +0400 |
commit | e29a45b396ccf507d858ec4afc301bdaf816b328 (patch) | |
tree | 29bdd2ed72f2ef26d4e7300b2bf58ce9282e575b /intern/cycles/render/film.cpp | |
parent | e920206a900cf322f3894f13ffeb1568c1bdfd12 (diff) |
Cycles: Separation of Indirect and Direct clamping.
Indirect and Direct samples can now be clamped individually. This way we can clamp the indirect samples (fireflies), while keeping the direct highlights.
Example render: http://www.pasteall.org/pic/show.php?id=66586
WARNING: This breaks backwards compatibility. If you had Clamping enabled in an old file, you must re-enable either Direct/Indirect clamping or both again.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D303
Diffstat (limited to 'intern/cycles/render/film.cpp')
-rw-r--r-- | intern/cycles/render/film.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index 23a70303557..0a1a88e6bfb 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -288,12 +288,15 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene) device_free(device, dscene, scene); KernelFilm *kfilm = &dscene->data.film; + KernelIntegrator *kintegrator = &dscene->data.integrator; + + bool use_clamping = (kintegrator->sample_clamp_direct != FLT_MAX) || (kintegrator->sample_clamp_indirect != FLT_MAX); /* update __data */ kfilm->exposure = exposure; kfilm->pass_flag = 0; kfilm->pass_stride = 0; - kfilm->use_light_pass = use_light_visibility; + kfilm->use_light_pass = use_light_visibility || use_clamping; foreach(Pass& pass, passes) { kfilm->pass_flag |= pass.type; |