From 83a4e1aaf9d1aa5e4747213dee5485945cecb05d Mon Sep 17 00:00:00 2001 From: charlie Date: Sat, 14 Jul 2018 13:11:28 +0200 Subject: 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 --- intern/cycles/util/util_math_float3.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'intern/cycles/util') 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); -- cgit v1.2.3