diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-23 18:34:34 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-23 18:34:34 +0400 |
commit | 01e22d1b9f3606d97f06c2d8a2bc969214322e9c (patch) | |
tree | fcbb80481ea74c731891b5151c94b1c0b9cbb3d1 /intern/cycles/render | |
parent | 22f48748771a96526c3abcfd6583f7cf86aa88c8 (diff) |
Cycles: more code refactoring to rename things internally as well. Also change
property name back so we keep compatibility.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/integrator.cpp | 8 | ||||
-rw-r--r-- | intern/cycles/render/integrator.h | 7 | ||||
-rw-r--r-- | intern/cycles/render/session.cpp | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp index 6acb5474fe4..47b1930e27c 100644 --- a/intern/cycles/render/integrator.cpp +++ b/intern/cycles/render/integrator.cpp @@ -54,7 +54,7 @@ Integrator::Integrator() ao_samples = 1; mesh_light_samples = 1; subsurface_samples = 1; - progressive = true; + method = PATH; sampling_pattern = SAMPLING_PATTERN_SOBOL; @@ -104,7 +104,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene kintegrator->sample_clamp = (sample_clamp == 0.0f)? FLT_MAX: sample_clamp*3.0f; - kintegrator->progressive = progressive; + kintegrator->branched = (method == BRANCHED_PATH); kintegrator->aa_samples = aa_samples; kintegrator->diffuse_samples = diffuse_samples; kintegrator->glossy_samples = glossy_samples; @@ -118,7 +118,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene /* sobol directions table */ int max_samples = 1; - if(!progressive) { + if(method == BRANCHED_PATH) { foreach(Light *light, scene->lights) max_samples = max(max_samples, light->samples); @@ -163,7 +163,7 @@ bool Integrator::modified(const Integrator& integrator) layer_flag == integrator.layer_flag && seed == integrator.seed && sample_clamp == integrator.sample_clamp && - progressive == integrator.progressive && + method == integrator.method && aa_samples == integrator.aa_samples && diffuse_samples == integrator.diffuse_samples && glossy_samples == integrator.glossy_samples && diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h index 10248fd5ad7..a58b4d25cd3 100644 --- a/intern/cycles/render/integrator.h +++ b/intern/cycles/render/integrator.h @@ -57,7 +57,12 @@ public: int mesh_light_samples; int subsurface_samples; - bool progressive; + enum Method { + BRANCHED_PATH = 0, + PATH = 1 + }; + + Method method; SamplingPattern sampling_pattern; diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index b4dad436edb..01f8a950c8f 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -830,7 +830,7 @@ void Session::path_trace() task.update_tile_sample = function_bind(&Session::update_tile_sample, this, _1); task.update_progress_sample = function_bind(&Session::update_progress_sample, this); task.need_finish_queue = params.progressive_refine; - task.integrator_progressive = scene->integrator->progressive; + task.integrator_branched = scene->integrator->method == Integrator::BRANCHED_PATH; device->task_add(task); } |