Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorWeizhen Huang <itsnotrj@gmail.com>2022-11-03 16:52:37 +0300
committerWeizhen Huang <itsnotrj@gmail.com>2022-11-03 19:30:55 +0300
commit4a43a148934fb97641c490a202fe3a1c76a3016b (patch)
tree290eb9e827e681a00e00e8d7b4bc8b33c4ded7d9 /intern
parentbde57b3a858c27a93ece6d1b02252132f34241e8 (diff)
Choosing between the light tree and the distant light group based on the total importance
Differential Revision: https://developer.blender.org/D16381
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/scene/light.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/intern/cycles/scene/light.cpp b/intern/cycles/scene/light.cpp
index 20650759c29..65d4c76fa8c 100644
--- a/intern/cycles/scene/light.cpp
+++ b/intern/cycles/scene/light.cpp
@@ -386,7 +386,6 @@ void LightManager::device_update_distribution(Device *device,
KernelLightTreeNode *light_tree_nodes = dscene->light_tree_nodes.alloc(linearized_bvh.size());
KernelLightTreeEmitter *light_tree_emitters = dscene->light_tree_emitters.alloc(
light_prims.size());
- float max_light_tree_energy = 0.0f;
for (int index = 0; index < linearized_bvh.size(); index++) {
const PackedLightTreeNode &node = linearized_bvh[index];
@@ -415,9 +414,6 @@ void LightManager::device_update_distribution(Device *device,
float energy = prim.calculate_energy(scene);
light_tree_emitters[emitter_index].energy = energy;
- if (energy > max_light_tree_energy) {
- max_light_tree_energy = energy;
- }
for (int i = 0; i < 3; i++) {
light_tree_emitters[emitter_index].bounding_box_min[i] = bbox.min[i];
@@ -473,12 +469,6 @@ void LightManager::device_update_distribution(Device *device,
}
}
- /* We set the parent node's energy to be the average energy,
- * which is used for deciding between the tree and distant lights. */
- if (max_light_tree_energy > 0.0f) {
- light_tree_nodes[0].energy = max_light_tree_energy;
- }
-
/* We also add distant lights to a separate group. */
KernelLightTreeDistantEmitter *light_tree_distant_group =
dscene->light_tree_distant_group.alloc(num_distant_lights + 1);