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_noise_texture.osl | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'intern/cycles/kernel/shaders/node_noise_texture.osl') diff --git a/intern/cycles/kernel/shaders/node_noise_texture.osl b/intern/cycles/kernel/shaders/node_noise_texture.osl index dabc0b6843f..e83e5b5b211 100644 --- a/intern/cycles/kernel/shaders/node_noise_texture.osl +++ b/intern/cycles/kernel/shaders/node_noise_texture.osl @@ -19,23 +19,23 @@ /* Noise */ -float noise(point p, string basis, float distortion, float detail, float fac, color Color) +float noise(point p, float distortion, float detail, float fac, color Color) { point r; int hard = 0; if (distortion != 0.0) { - r[0] = noise_basis(p + point(13.5), basis) * distortion; - r[1] = noise_basis(p, basis) * distortion; - r[2] = noise_basis(p - point(13.5), basis) * distortion; + r[0] = safe_noise(p + point(13.5), "unsigned") * distortion; + r[1] = safe_noise(p, "unsigned") * distortion; + r[2] = safe_noise(p - point(13.5), "unsigned") * distortion; p += r; } - fac = noise_turbulence(p, basis, detail, hard); + fac = noise_turbulence(p, detail, hard); - Color = color(fac, noise_turbulence(point(p[1], p[0], p[2]), basis, detail, hard), - noise_turbulence(point(p[1], p[2], p[0]), basis, detail, hard)); + Color = color(fac, noise_turbulence(point(p[1], p[0], p[2]), detail, hard), + noise_turbulence(point(p[1], p[2], p[0]), detail, hard)); return fac; } @@ -55,7 +55,6 @@ shader node_noise_texture( if (use_mapping) p = transform(mapping, p); - string Basis = "Perlin"; - Fac = noise(p * Scale, Basis, Distortion, Detail, Fac, Color); + Fac = noise(p * Scale, Distortion, Detail, Fac, Color); } -- cgit v1.2.3