Fix T47813: Cycles Standalone not respecting integrator sample_clamp_direct

This commit is contained in:
Sergey Sharybin 2016-04-13 10:39:21 +02:00
parent c8e2cc21ab
commit 9604db7650
3 changed files with 13 additions and 8 deletions

@ -297,10 +297,6 @@ void BlenderSync::sync_film()
Film *film = scene->film;
Film prevfilm = *film;
/* Clamping */
Integrator *integrator = scene->integrator;
film->use_sample_clamp = (integrator->sample_clamp_direct != 0.0f || integrator->sample_clamp_indirect != 0.0f);
film->exposure = get_float(cscene, "film_exposure");
film->filter_type = (FilterType)get_enum(cscene,
"pixel_filter_type",

@ -16,6 +16,7 @@
#include "device.h"
#include "integrator.h"
#include "film.h"
#include "light.h"
#include "scene.h"
#include "shader.h"
@ -174,6 +175,14 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
device->tex_alloc("__sobol_directions", dscene->sobol_directions);
/* Clamping. */
bool use_sample_clamp = (sample_clamp_direct != 0.0f ||
sample_clamp_indirect != 0.0f);
if(use_sample_clamp != scene->film->use_sample_clamp) {
scene->film->use_sample_clamp = use_sample_clamp;
scene->film->tag_update(scene);
}
need_update = false;
}

@ -217,13 +217,13 @@ void Scene::device_update(Device *device_, Progress& progress)
if(progress.get_cancel() || device->have_error()) return;
progress.set_status("Updating Film");
film->device_update(device, &dscene, this);
progress.set_status("Updating Integrator");
integrator->device_update(device, &dscene, this);
if(progress.get_cancel() || device->have_error()) return;
progress.set_status("Updating Integrator");
integrator->device_update(device, &dscene, this);
progress.set_status("Updating Film");
film->device_update(device, &dscene, this);
if(progress.get_cancel() || device->have_error()) return;