[Bf-blender-cvs] [f53bd178366] master: Cycles: take into account film exposure for light sampling threshold

Brecht Van Lommel noreply at git.blender.org
Mon Dec 12 18:30:57 CET 2022


Commit: f53bd178366a95c3cef8c4b1b99b4d7a0cdcf4eb
Author: Brecht Van Lommel
Date:   Mon Dec 12 17:51:21 2022 +0100
Branches: master
https://developer.blender.org/rBf53bd178366a95c3cef8c4b1b99b4d7a0cdcf4eb

Cycles: take into account film exposure for light sampling threshold

To avoid issues with lights being either skipped or sampled unnecessarily
when the exposure is set low or high.

Contributed by Alaska.

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

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

M	intern/cycles/scene/integrator.cpp

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

diff --git a/intern/cycles/scene/integrator.cpp b/intern/cycles/scene/integrator.cpp
index 64af0dadaa6..1aaac121c31 100644
--- a/intern/cycles/scene/integrator.cpp
+++ b/intern/cycles/scene/integrator.cpp
@@ -253,7 +253,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
 
   kintegrator->use_light_tree = scene->integrator->use_light_tree;
   if (light_sampling_threshold > 0.0f) {
-    kintegrator->light_inv_rr_threshold = 1.0f / light_sampling_threshold;
+    kintegrator->light_inv_rr_threshold = scene->film->get_exposure() / light_sampling_threshold;
   }
   else {
     kintegrator->light_inv_rr_threshold = 0.0f;



More information about the Bf-blender-cvs mailing list