diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-12 14:09:31 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-12 14:09:31 +0300 |
commit | 613b37bc2c81202a34346b40465923e8f47cebbf (patch) | |
tree | f567f30b59f475744575589f4330c61afc30a5a0 /intern/cycles/kernel/closure | |
parent | 013750947657fcdea313782d82ec51cc111f0c06 (diff) |
Shading: Add More Features To The Voronoi Node.
This patch allows the Voronoi node to operate in 1D, 2D, and 4D space.
It also adds a Randomness input to control the randomness of the texture.
Additionally, it adds three new modes of operation:
- Smooth F1: A smooth version of F1 Voronoi with no discontinuities.
- Distance To Edge: Returns the distance to the edges of the cells.
- N-Sphere Radius: Returns the radius of the n-sphere inscribed in
the cells. In other words, it is half the distance between the
closest feature point and the feature point closest to it.
And it removes the following three modes of operation:
- F3.
- F4.
- Cracks.
The Distance metric is now called Euclidean, and it computes the actual
euclidean distance as opposed to the old method of computing the squared
euclidean distance.
This breaks backward compatibility in many ways, including the base case.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5743
Diffstat (limited to 'intern/cycles/kernel/closure')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_util.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_util.h b/intern/cycles/kernel/closure/bsdf_util.h index 3bce47caedb..a73dee1b045 100644 --- a/intern/cycles/kernel/closure/bsdf_util.h +++ b/intern/cycles/kernel/closure/bsdf_util.h @@ -134,20 +134,6 @@ ccl_device float schlick_fresnel(float u) return m2 * m2 * m; // pow(m, 5) } -ccl_device float smooth_step(float edge0, float edge1, float x) -{ - float result; - if (x < edge0) - result = 0.0f; - else if (x >= edge1) - result = 1.0f; - else { - float t = (x - edge0) / (edge1 - edge0); - result = (3.0f - 2.0f * t) * (t * t); - } - return result; -} - /* Calculate the fresnel color which is a blend between white and the F0 color (cspec0) */ ccl_device_forceinline float3 interpolate_fresnel_color(float3 L, float3 H, float ior, float F0, float3 cspec0) |