[Bf-blender-cvs] [fc1cc3dbd9a] soc-2022-many-lights-sampling: add use_light_tree and splitting_threshold to kernel integrator

Jebbly noreply at git.blender.org
Fri Jun 10 16:32:59 CEST 2022


Commit: fc1cc3dbd9a59a1d37b7b3ea8d735c46e5ad1fb3
Author: Jebbly
Date:   Wed Jun 8 00:52:11 2022 -0400
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rBfc1cc3dbd9a59a1d37b7b3ea8d735c46e5ad1fb3

add use_light_tree and splitting_threshold to kernel integrator

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

M	intern/cycles/kernel/types.h
M	intern/cycles/scene/integrator.cpp

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

diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h
index b1ca379bab8..9f4118feb8e 100644
--- a/intern/cycles/kernel/types.h
+++ b/intern/cycles/kernel/types.h
@@ -1288,8 +1288,12 @@ typedef struct KernelIntegrator {
   /* MIS debugging. */
   int direct_light_sampling_type;
 
+  /* Light tree. */
+  int use_light_tree;
+  float splitting_threshold;
+
   /* padding */
-  int pad1;
+  int pad1, pad2, pad3;
 } KernelIntegrator;
 static_assert_align(KernelIntegrator, 16);
 
diff --git a/intern/cycles/scene/integrator.cpp b/intern/cycles/scene/integrator.cpp
index eb414af0c4c..db39d997d8f 100644
--- a/intern/cycles/scene/integrator.cpp
+++ b/intern/cycles/scene/integrator.cpp
@@ -183,6 +183,9 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
   kintegrator->direct_light_sampling_type = DIRECT_LIGHT_SAMPLING_MIS;
 #endif
 
+  kintegrator->use_light_tree = scene->integrator->use_light_tree;
+  kintegrator->splitting_threshold = scene->integrator->splitting_threshold;
+
   /* Transparent Shadows
    * We only need to enable transparent shadows, if we actually have
    * transparent shaders in the scene. Otherwise we can disable it



More information about the Bf-blender-cvs mailing list