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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-30 19:38:27 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-30 19:44:18 +0300
commit2e2e7aff7cb28337684534d2207816946407788b (patch)
tree14da1dfc59a2638b28cd12aeea70698e89c97235 /intern/cycles/kernel/kernel_light.h
parentcc397b918ff1b2a51b3b82367506eb7684860cea (diff)
parent885cc4cf9a1d5c167e4cbd26c3294d8b1ad400d8 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/kernel/kernel_light.h')
-rw-r--r--intern/cycles/kernel/kernel_light.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h
index 0165eaa606f..262d7df1364 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -75,7 +75,7 @@ ccl_device_inline float rect_light_sample(float3 P,
/* Compute internal angles (gamma_i). */
float4 diff = make_float4(x0, y1, x1, y0) - make_float4(x1, y0, x0, y1);
float4 nz = make_float4(y0, x1, y1, x0) * diff;
- nz = nz / sqrt(sqr(z0 * diff) + sqr(nz));
+ nz = nz / sqrt(z0 * z0 * diff * diff + nz * nz);
float g0 = safe_acosf(-nz.x * nz.y);
float g1 = safe_acosf(-nz.y * nz.z);
float g2 = safe_acosf(-nz.z * nz.w);