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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-05 19:17:45 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-05 19:17:45 +0400
commit6e93e3329427390c35fb93b2c5add8a639671bb6 (patch)
tree47785308f6b8341d8cc81e351045180d96f447a1 /intern/cycles/render/integrator.cpp
parent5d0bfc032530018ba20bb13cee5970695753e80b (diff)
Cycles: add rejection of inf/nan samples, in principle these should not happen
but this makes it more reliable for now. Also add an integrator "Clamp" option, to clamp very light samples to a maximum value. This will reduce accuracy but may help reducing noise and speed up convergence.
Diffstat (limited to 'intern/cycles/render/integrator.cpp')
-rw-r--r--intern/cycles/render/integrator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index ff2afc7119b..6e6d30f3879 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -43,6 +43,7 @@ Integrator::Integrator()
no_caustics = false;
seed = 0;
layer_flag = ~0;
+ sample_clamp = 0.0f;
need_update = true;
}
@@ -85,6 +86,8 @@ void Integrator::device_update(Device *device, DeviceScene *dscene)
kintegrator->use_ambient_occlusion =
((dscene->data.film.pass_flag & PASS_AO) || dscene->data.background.ao_factor != 0.0f);
+
+ kintegrator->sample_clamp = (sample_clamp == 0.0f)? FLT_MAX: sample_clamp*3.0f;
/* sobol directions table */
int dimensions = PRNG_BASE_NUM + (max_bounce + transparent_max_bounce + 2)*PRNG_BOUNCE_NUM;
@@ -117,7 +120,8 @@ bool Integrator::modified(const Integrator& integrator)
transparent_shadows == integrator.transparent_shadows &&
no_caustics == integrator.no_caustics &&
layer_flag == integrator.layer_flag &&
- seed == integrator.seed);
+ seed == integrator.seed &&
+ sample_clamp == integrator.sample_clamp);
}
void Integrator::tag_update(Scene *scene)