diff options
author | Matteo Falduto <matteolegna> | 2021-04-29 16:10:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-04-29 16:58:51 +0300 |
commit | 8b9b87aee8e5e9a68b3c211049377d77d44126c0 (patch) | |
tree | e408881a5d0a248d1c48ec2289b94c2d1bba7f11 | |
parent | db021ee2ea0355f0c1733e51e3ee7c54e6ca2a3e (diff) |
Cleanup: removed unnecessary multiplications in area light importance sampling
Differential Revision: https://developer.blender.org/D11114
-rw-r--r-- | intern/cycles/kernel/kernel_light_common.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_light_common.h b/intern/cycles/kernel/kernel_light_common.h index c21c517a353..4a683d36226 100644 --- a/intern/cycles/kernel/kernel_light_common.h +++ b/intern/cycles/kernel/kernel_light_common.h @@ -200,12 +200,12 @@ ccl_device bool light_spread_clamp_area_light(const float3 P, * uv coordinates. */ const float new_center_u = 0.5f * (min_u + max_u); const float new_center_v = 0.5f * (min_v + max_v); - const float new_len_u = 0.5f * (max_u - min_u); - const float new_len_v = 0.5f * (max_v - min_v); + const float new_len_u = max_u - min_u; + const float new_len_v = max_v - min_v; *lightP = *lightP + new_center_u * u + new_center_v * v; - *axisu = u * new_len_u * 2.0f; - *axisv = v * new_len_v * 2.0f; + *axisu = u * new_len_u; + *axisv = v * new_len_v; return true; } |