From 46d8bcb617bcc774e6b312e555edba54a3654f75 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 28 May 2015 01:07:37 +0200 Subject: Cleanup: Remove unused Noise Basis texture code. Same as last commit, code is unused and this one actually would have required some fixes, as these variants output values outside the 0-1 value range, which doesn't fit Cycles shader design. --- intern/cycles/kernel/shaders/node_texture.h | 38 +++-------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'intern/cycles/kernel/shaders/node_texture.h') diff --git a/intern/cycles/kernel/shaders/node_texture.h b/intern/cycles/kernel/shaders/node_texture.h index 2d47b8e4672..fc2cfdcd55c 100644 --- a/intern/cycles/kernel/shaders/node_texture.h +++ b/intern/cycles/kernel/shaders/node_texture.h @@ -106,41 +106,9 @@ float safe_noise(point p, string type) return f; } -float noise_basis(point p, string basis) -{ - if (basis == "Perlin") - return safe_noise(p, "unsigned"); -#if 0 - if (basis == "Voronoi F1") - return voronoi_F1S(p); - if (basis == "Voronoi F2") - return voronoi_F2S(p); - if (basis == "Voronoi F3") - return voronoi_F3S(p); - if (basis == "Voronoi F4") - return voronoi_F4S(p); - if (basis == "Voronoi F2-F1") - return voronoi_F1F2S(p); - if (basis == "Voronoi Crackle") - return voronoi_CrS(p); -#endif - if (basis == "Cell Noise") - return cellnoise(p); - - return 0.0; -} - -/* Soft/Hard Noise */ - -float noise_basis_hard(point p, string basis, int hard) -{ - float t = noise_basis(p, basis); - return (hard) ? fabs(2.0 * t - 1.0) : t; -} - /* Turbulence */ -float noise_turbulence(point p, string basis, float details, int hard) +float noise_turbulence(point p, float details, int hard) { float fscale = 1.0; float amp = 1.0; @@ -151,7 +119,7 @@ float noise_turbulence(point p, string basis, float details, int hard) n = (int)octaves; for (i = 0; i <= n; i++) { - float t = noise_basis(fscale * p, basis); + float t = safe_noise(fscale * p, "unsigned"); if (hard) t = fabs(2.0 * t - 1.0); @@ -164,7 +132,7 @@ float noise_turbulence(point p, string basis, float details, int hard) float rmd = octaves - floor(octaves); if (rmd != 0.0) { - float t = noise_basis(fscale * p, basis); + float t = safe_noise(fscale * p, "unsigned"); if (hard) t = fabs(2.0 * t - 1.0); -- cgit v1.2.3