Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/render/integrator.cpp')
-rw-r--r--intern/cycles/render/integrator.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index c97a6549653..d93856ceb61 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -115,7 +115,15 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
}
});
- if (sampling_pattern_is_modified()) {
+ const bool need_update_lut = ao_samples_is_modified() || diffuse_samples_is_modified() ||
+ glossy_samples_is_modified() || max_bounce_is_modified() ||
+ max_transmission_bounce_is_modified() ||
+ mesh_light_samples_is_modified() || method_is_modified() ||
+ sampling_pattern_is_modified() ||
+ subsurface_samples_is_modified() ||
+ transmission_samples_is_modified() || volume_samples_is_modified();
+
+ if (need_update_lut) {
dscene->sample_pattern_lut.tag_realloc();
}
@@ -248,7 +256,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
int dimensions = PRNG_BASE_NUM + max_samples * PRNG_BOUNCE_NUM;
dimensions = min(dimensions, SOBOL_MAX_DIMENSIONS);
- if (sampling_pattern_is_modified()) {
+ if (need_update_lut) {
if (sampling_pattern == SAMPLING_PATTERN_SOBOL) {
uint *directions = dscene->sample_pattern_lut.alloc(SOBOL_BITS * dimensions);
@@ -272,6 +280,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
}
}
+ dscene->sample_pattern_lut.clear_modified();
clear_modified();
}
@@ -292,6 +301,11 @@ void Integrator::tag_update(Scene *scene, uint32_t flag)
tag_ao_bounces_modified();
}
+ if ((flag & LIGHT_SAMPLES_MODIFIED) && (method == BRANCHED_PATH)) {
+ /* the number of light samples may affect the size of the sample_pattern_lut */
+ tag_sampling_pattern_modified();
+ }
+
if (filter_glossy_is_modified()) {
foreach (Shader *shader, scene->shaders) {
if (shader->has_integrator_dependency) {