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:
authorcharlie <mistajolly@gmail.com>2018-07-14 14:11:28 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-07-15 01:45:42 +0300
commit83a4e1aaf9d1aa5e4747213dee5485945cecb05d (patch)
tree4e8c5feacaf9a82f314f4b5ff9f9419f3c553133 /intern/cycles/util
parent4697604331482c394c8a148c54a8e942120b634f (diff)
Cycles: add voronoi features and distance settings from Blender.
Features to get the 2nd, 3rd, 4th closest point instead of the closest, and various distance metrics. No viewport/Eevee support yet. Patch by Michel Anders, Charlie Jolly and Brecht Van Lommel. Differential Revision: https://developer.blender.org/D3503
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_math_float3.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math_float3.h b/intern/cycles/util/util_math_float3.h
index e42ded76c75..3a5a2ab2244 100644
--- a/intern/cycles/util/util_math_float3.h
+++ b/intern/cycles/util/util_math_float3.h
@@ -280,6 +280,11 @@ ccl_device_inline float3 sqrt(const float3& a)
#endif
}
+ccl_device_inline float3 pow3(const float3& a, float e)
+{
+ return make_float3(powf(a.x, e), powf(a.y, e), powf(a.z, e));
+}
+
ccl_device_inline float3 mix(const float3& a, const float3& b, float t)
{
return a + t*(b - a);