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:
authorCampbell Barton <ideasman42@gmail.com>2017-08-19 14:54:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-19 14:54:05 +0300
commit2332051419d9aeb99477335e64720b82b106426a (patch)
tree61935b3296c88f2c6f6227f158fdab5d86d41072 /intern/cycles/util
parent4437ccf4767c6958847da19c8f8b839f6e3e263b (diff)
parent1cc4033df8d7fdd87bc1be14e265ab77f0713e54 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_math.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 4d51ec5570a..0d27ee06fa7 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -330,15 +330,22 @@ template<class A, class B> A lerp(const A& a, const A& b, const B& t)
return (A)(a * ((B)1 - t) + b * t);
}
+#endif /* __KERNEL_OPENCL__ */
+
/* Triangle */
+#ifndef __KERNEL_OPENCL__
ccl_device_inline float triangle_area(const float3& v1,
const float3& v2,
const float3& v3)
+#else
+ccl_device_inline float triangle_area(const float3 v1,
+ const float3 v2,
+ const float3 v3)
+#endif
{
return len(cross(v3 - v2, v1 - v2))*0.5f;
}
-#endif /* __KERNEL_OPENCL__ */
/* Orthonormal vectors */