[Bf-blender-cvs] [84b42e7567b] soc-2022-many-lights-sampling: Disable light threshold when using light tree

Alaska noreply at git.blender.org
Mon Nov 28 11:30:22 CET 2022


Commit: 84b42e7567b820bbd5754fb2797998d96f81d7b4
Author: Alaska
Date:   Mon Nov 28 11:28:36 2022 +0100
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB84b42e7567b820bbd5754fb2797998d96f81d7b4

Disable light threshold when using light tree

In rBd879cb9f4c1f Brecht made a change to disable the light threshold
when using the light tree. However, the code change ended up doing the
opposite of that. This patch fixes that.

Reviewed By: weizhen

Differential Revision: https://developer.blender.org/D16629

===================================================================

M	intern/cycles/blender/sync.cpp

===================================================================

diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp
index 5216219db96..85a4e47c66b 100644
--- a/intern/cycles/blender/sync.cpp
+++ b/intern/cycles/blender/sync.cpp
@@ -351,7 +351,7 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
   bool use_light_tree = get_boolean(cscene, "use_light_tree");
   integrator->set_use_light_tree(use_light_tree);
   integrator->set_light_sampling_threshold(
-      (use_light_tree) ? get_float(cscene, "light_sampling_threshold") : 0.0f);
+      (use_light_tree) ? 0.0f : get_float(cscene, "light_sampling_threshold"));
 
   if (integrator->use_light_tree_is_modified()) {
     scene->light_manager->tag_update(scene, LightManager::UPDATE_ALL);



More information about the Bf-blender-cvs mailing list