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:
authorMatteo Falduto <matteolegna>2021-04-29 16:10:16 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-04-29 16:58:51 +0300
commit8b9b87aee8e5e9a68b3c211049377d77d44126c0 (patch)
treee408881a5d0a248d1c48ec2289b94c2d1bba7f11 /intern
parentdb021ee2ea0355f0c1733e51e3ee7c54e6ca2a3e (diff)
Cleanup: removed unnecessary multiplications in area light importance sampling
Differential Revision: https://developer.blender.org/D11114
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_light_common.h8
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;
}