diff options
author | Thomas Dinges <blender@dingto.org> | 2012-09-05 03:34:08 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-09-05 03:34:08 +0400 |
commit | ebe29c3f8444f1ca8128ecc989f8f4af9bec5dac (patch) | |
tree | d6b7c181fbb2607bd278e91a54904d95c1a92142 /intern/cycles/kernel/osl/nodes | |
parent | 0206d7d02bb3b1edde2e53fe05bea81a68f77f30 (diff) |
OSL:
* Noise Texture is rendering now.
Diffstat (limited to 'intern/cycles/kernel/osl/nodes')
-rw-r--r-- | intern/cycles/kernel/osl/nodes/node_noise_texture.osl | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_noise_texture.osl b/intern/cycles/kernel/osl/nodes/node_noise_texture.osl index 7738902f529..1ddb4d8a08b 100644 --- a/intern/cycles/kernel/osl/nodes/node_noise_texture.osl +++ b/intern/cycles/kernel/osl/nodes/node_noise_texture.osl @@ -21,11 +21,10 @@ /* Noise */ -float noise(point p, string basis, float distortion, float detail) +float noise(point p, string basis, float distortion, float detail, float fac, color Color) { point r; int hard = 0; - float fac = 0.0; if(distortion != 0.0) { r[0] = noise_basis(p + point(13.5), basis) * distortion; @@ -37,23 +36,21 @@ float noise(point p, string basis, float distortion, float detail) fac = noise_turbulence(p, basis, 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)); + return fac; - - /* - Color[0] = Fac; - Color[1] = noise_turbulence(point(p[1], p[0], p[2]), basis, detail, hard); - Color[2] = noise_turbulence(point(p[1], p[2], p[0]), basis, detail, hard); - */ } shader node_noise_texture( - string Basis = "Perlin", float Distortion = 0.0, float Scale = 5.0, float Detail = 2.0, point Vector = P, - output float Fac = 0.0) + output float Fac = 0.0, + output color Color = color(0.2, 0.2, 0.2)) { - Fac = noise(Vector*Scale, Basis, Distortion, Detail); + string Basis = "Perlin"; + Fac = noise(Vector*Scale, Basis, Distortion, Detail, Fac, Color); } |