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:
authorErik Englesson <erikenglesson@gmail.com>2018-08-10 23:40:17 +0300
committerErik Englesson <erikenglesson@gmail.com>2018-08-12 12:59:33 +0300
commit4608e5ac269758df5c37e57b77afadd27fcf6de2 (patch)
treee2768f48970cb98bf5986c87a5543e3522de7602 /intern/cycles/blender/blender_sync.cpp
parent2d839a08e4939d7c5a113f675cebf5cb8cd7d2bc (diff)
Cycles: light_tree_pdf() now accounts for splitting
For the MIS calculations we need to be able to calculate the probability to sample a light using the light tree. This did not account for splitting so if splitting was used the probability would be wrong. This has now been fixed. Also, if we are in PATH mode then the splitting threshold is set to zero.
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r--intern/cycles/blender/blender_sync.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index bb67099a0c2..73ddfccd91b 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -282,7 +282,12 @@ void BlenderSync::sync_integrator()
Integrator::PATH);
integrator->use_light_tree = get_boolean(cscene, "use_light_tree");
- integrator->splitting_threshold = get_float(cscene, "splitting_threshold");
+ if(get_enum(cscene, "progressive") == 0) {
+ integrator->splitting_threshold = get_float(cscene, "splitting_threshold");
+ }
+ else { // Not using branched path tracing
+ integrator->splitting_threshold = 0.0f;
+ }
integrator->sample_all_lights_direct = get_boolean(cscene, "sample_all_lights_direct");
integrator->sample_all_lights_indirect = get_boolean(cscene, "sample_all_lights_indirect");
integrator->light_sampling_threshold = get_float(cscene, "light_sampling_threshold");