From 623cb023b9a47cb8a4e5e48326273eb38b78bdcd Mon Sep 17 00:00:00 2001 From: Alaska Date: Tue, 13 Jun 2023 15:36:05 +0200 Subject: [PATCH] Cycles: Fix light tree sampling of multiple large distant lights This fixes an issue where the light tree sampling algorithm would discard light samples from groups of distance lights with an angle greater than 0 when it shouldn't. Pull Request: https://projects.blender.org/blender/blender/pulls/108832 --- intern/cycles/kernel/light/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/kernel/light/tree.h b/intern/cycles/kernel/light/tree.h index 32c5788db31..ead95a55731 100644 --- a/intern/cycles/kernel/light/tree.h +++ b/intern/cycles/kernel/light/tree.h @@ -316,7 +316,7 @@ ccl_device void light_tree_node_importance(KernelGlobals kg, return; } point_to_centroid = -bcone.axis; - cos_theta_u = fast_cosf(bcone.theta_o); + cos_theta_u = fast_cosf(bcone.theta_o + bcone.theta_e); distance = 1.0f; } else {