Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-10-03 19:47:37 +0400
committerThomas Dinges <blender@dingto.org>2014-10-03 19:51:21 +0400
commit3aa65574f5562ef4bc6ac8ec7ef6a800d42681fd (patch)
tree4ff0824b82cd642597f47067df00067c16af9c53 /intern/cycles/kernel/shaders/node_texture.h
parentdc1ca0c94f16cebfc4c3ac0305af6ccdecb9bf4b (diff)
Cycles / OSL: Make the signed/unsigned Perlin parameter more self explaining.
Diffstat (limited to 'intern/cycles/kernel/shaders/node_texture.h')
-rw-r--r--intern/cycles/kernel/shaders/node_texture.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/shaders/node_texture.h b/intern/cycles/kernel/shaders/node_texture.h
index de51559f297..2710eed414a 100644
--- a/intern/cycles/kernel/shaders/node_texture.h
+++ b/intern/cycles/kernel/shaders/node_texture.h
@@ -153,12 +153,12 @@ float voronoi_CrS(point p) { return 2.0 * voronoi_Cr(p) - 1.0; }
/* Noise Bases */
-float safe_noise(point p, int type)
+float safe_noise(point p, string type)
{
float f = 0.0;
/* Perlin noise in range -1..1 */
- if (type == 0)
+ if (type == "signed")
f = noise("perlin", p);
/* Perlin noise in range 0..1 */
@@ -175,7 +175,7 @@ float safe_noise(point p, int type)
float noise_basis(point p, string basis)
{
if (basis == "Perlin")
- return safe_noise(p, 1);
+ return safe_noise(p, "unsigned");
if (basis == "Voronoi F1")
return voronoi_F1S(p);
if (basis == "Voronoi F2")