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:
authorStefan Werner <stefan.werner@tangent-animation.com>2018-07-30 16:42:00 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2018-07-30 16:42:00 +0300
commitb59d85b5a56c020c7b86b0cca4dc38e4950550f9 (patch)
tree36f642c8e7b5fdb4143fc0b7ce8889697a1e6f34 /intern/cycles/kernel/kernel_light.h
parentc8b6e3d77717a6efdc0dc68c18aa07a291385e3a (diff)
Cycles: Fixed OpenCL build. sqr(float4) is available on CUDA and CPU, but not on OpenCL.
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 b5a777efa78..2a300d3419e 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -75,7 +75,7 @@ ccl_device_inline float area_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);