* OSL can't overwrite input parameters, use a local variable instead.
authorThomas Dinges <blender@dingto.org>
Sun, 2 Sep 2012 16:37:58 +0000 (16:37 +0000)
committerThomas Dinges <blender@dingto.org>
Sun, 2 Sep 2012 16:37:58 +0000 (16:37 +0000)
intern/cycles/kernel/osl/nodes/node_texture.h

index 5f3d4d9f3bf1d92ea123a05374fa00dcfd0a2e75..b00bf6ab31fbb41507a72ef950eebcab029793dc 100644 (file)
@@ -212,14 +212,14 @@ float noise_wave(string wave, float a)
 
 /* Turbulence */
 
-float noise_turbulence(point p, string basis, float octaves, int hard)
+float noise_turbulence(point p, string basis, float details, int hard)
 {
        float fscale = 1.0;
        float amp = 1.0;
        float sum = 0.0;
        int i, n;
        
-       octaves = clamp(octaves, 0.0, 16.0);
+       float octaves = clamp(details, 0.0, 16.0);
        n = (int)octaves;
 
        for (i = 0; i <= n; i++) {