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
This commit is contained in:
Brecht Van Lommel
2022-12-12 17:51:21 +01:00
parent 312e42708f
commit f53bd17836

View File

@@ -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;