diff options
author | charlie <mistajolly@gmail.com> | 2018-07-14 14:11:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-15 01:45:42 +0300 |
commit | 83a4e1aaf9d1aa5e4747213dee5485945cecb05d (patch) | |
tree | 4e8c5feacaf9a82f314f4b5ff9f9419f3c553133 /intern/cycles/util | |
parent | 4697604331482c394c8a148c54a8e942120b634f (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.h | 5 |
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); |