[Bf-blender-cvs] [c86eb358fc6] soc-2020-production-ready-light-tree: Fixed using wrong angle in light tree importance

Sam Kottler noreply at git.blender.org
Thu Jun 18 16:42:30 CEST 2020


Commit: c86eb358fc635a82a971c38c7d42b6d573863a42
Author: Sam Kottler
Date:   Thu Jun 18 08:37:22 2020 -0600
Branches: soc-2020-production-ready-light-tree
https://developer.blender.org/rBc86eb358fc635a82a971c38c7d42b6d573863a42

Fixed using wrong angle in light tree importance

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

M	intern/cycles/kernel/kernel_light.h
M	release/datafiles/locale
M	release/scripts/addons
M	release/scripts/addons_contrib

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

diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h
index d470d340b85..438176f9518 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -1216,8 +1216,11 @@ ccl_device float calc_importance(KernelGlobals *kg,
   }
 
   /* cos(theta') */
-  const float theta = fast_acosf(dot(axis, centroid_to_P_dir));
-  const float theta_prime = fmaxf(theta - theta_o - theta_u, 0.0f);
+  float cos_theta = fabsf(dot(axis, centroid_to_P_dir));
+  /* theta is the angle between the axis and the line between P and the centroid. There are two
+   * such angles so take the smaller one. */
+  const float theta = fast_acosf(cos_theta);
+  const float theta_prime = fminf(fmaxf(theta - theta_o - theta_u, 0.0f), theta_e);
   if (theta_prime >= theta_e) {
     return 0.0f;
   }
diff --git a/release/datafiles/locale b/release/datafiles/locale
index 6a514935090..72e5040232a 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 6a51493509090c7fa3bd2e69105761c3c144c7dd
+Subproject commit 72e5040232a544b293dca05dac5707bd4e4bffaf
diff --git a/release/scripts/addons b/release/scripts/addons
index ba2521b7ed1..ca6405bac34 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit ba2521b7ed14b5deb6bb9a82a442bc85d2e05224
+Subproject commit ca6405bac34ebf2122bd37a5ad40c03b4bb30f33
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 4cf486c4eba..7c36b48507f 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 4cf486c4eba158b453bdd87d97b74192ef7497b2
+Subproject commit 7c36b48507f79ca62f8c038bad0fb3468c4f48e2



More information about the Bf-blender-cvs mailing list