[Bf-blender-cvs] [7d33edcf369] soc-2022-many-lights-sampling: Fix `theta - theta_o - theta_u = theta_e = 0` considered invisible
RiverIntheSky
noreply at git.blender.org
Fri Dec 2 00:00:45 CET 2022
Commit: 7d33edcf369ca6136680cfbd4e6415cd66e16c94
Author: RiverIntheSky
Date: Thu Dec 1 23:58:00 2022 +0100
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB7d33edcf369ca6136680cfbd4e6415cd66e16c94
Fix `theta - theta_o - theta_u = theta_e = 0` considered invisible
===================================================================
M intern/cycles/kernel/light/tree.h
===================================================================
diff --git a/intern/cycles/kernel/light/tree.h b/intern/cycles/kernel/light/tree.h
index eba03e93cb9..95a7fa0ed79 100644
--- a/intern/cycles/kernel/light/tree.h
+++ b/intern/cycles/kernel/light/tree.h
@@ -125,12 +125,12 @@ ccl_device void light_tree_importance(const float3 N_or_D,
/* minimum angle an emitter’s axis would form with the direction to the shading point,
* cos(theta') in the paper */
float cos_min_outgoing_angle;
- if ((cos_theta > cos_theta_u) || (cos_theta_minus_theta_u > cos_theta_o)) {
- /* theta - theta_o - theta_u < 0 */
+ if ((cos_theta >= cos_theta_u) || (cos_theta_minus_theta_u >= cos_theta_o)) {
+ /* theta - theta_o - theta_u <= 0 */
kernel_assert((fast_acosf(cos_theta) - bcone.theta_o - fast_acosf(cos_theta_u)) < 5e-4f);
cos_min_outgoing_angle = 1.0f;
}
- else if ((cos_theta > cos_theta_u) || (bcone.theta_o + bcone.theta_e > M_PI_F) ||
+ else if ((bcone.theta_o + bcone.theta_e > M_PI_F) ||
(cos_theta_minus_theta_u > cos(bcone.theta_o + bcone.theta_e))) {
/* theta' = theta - theta_o - theta_u < theta_e */
kernel_assert(
More information about the Bf-blender-cvs
mailing list