[Bf-blender-cvs] [dcd88ac161f] soc-2022-many-lights-sampling: Merge branch 'master' into soc-2022-many-lights-sampling
Brecht Van Lommel
noreply at git.blender.org
Mon Sep 12 20:19:06 CEST 2022
Commit: dcd88ac161f3efb74b9af26bc31c16243dd3432c
Author: Brecht Van Lommel
Date: Mon Sep 12 19:25:23 2022 +0200
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rBdcd88ac161f3efb74b9af26bc31c16243dd3432c
Merge branch 'master' into soc-2022-many-lights-sampling
===================================================================
===================================================================
diff --cc intern/cycles/kernel/integrator/shade_light.h
index 122cbba763f,f2d65eddfbb..181a540dd97
--- a/intern/cycles/kernel/integrator/shade_light.h
+++ b/intern/cycles/kernel/integrator/shade_light.h
@@@ -62,12 -62,7 +62,11 @@@ ccl_device_inline void integrate_light(
/* multiple importance sampling, get regular light pdf,
* and compute weight with respect to BSDF pdf */
const float mis_ray_pdf = INTEGRATOR_STATE(state, path, mis_ray_pdf);
+ if (kernel_data.integrator.use_light_tree) {
+ const float3 N = INTEGRATOR_STATE(state, path, mis_origin_n);
+ ls.pdf *= light_tree_pdf(kg, state, ray_P, N, ~ls.lamp);
+ }
- const float mis_weight = light_sample_mis_weight_forward(kg, mis_ray_pdf, ls.pdf);
- light_eval *= mis_weight;
+ mis_weight = light_sample_mis_weight_forward(kg, mis_ray_pdf, ls.pdf);
}
/* Write to render buffer. */
More information about the Bf-blender-cvs
mailing list