Cycles / Math functions:

* Rename some math functions:
len -> length
len_squared -> length_squared
normalize_len -> normalize_length

* This way OpenCL uses its inbuilt length() function, rather than our own. The other two functions have been renamed for consistency. 
* Tested CPU, CUDA and OpenCL compile, should be no functional changes.
This commit is contained in:
Thomas Dinges
2013-06-02 20:39:32 +00:00
parent 834492489a
commit c5ed6765b9
22 changed files with 74 additions and 75 deletions

View File

@@ -29,7 +29,7 @@ __device_noinline float svm_wave(NodeWaveType type, float3 p, float scale, float
if(type == NODE_WAVE_BANDS)
n = (p.x + p.y + p.z) * 10.0f;
else /* if(type == NODE_WAVE_RINGS) */
n = len(p) * 20.0f;
n = length(p) * 20.0f;
if(distortion != 0.0f)
n += distortion * noise_turbulence(p*dscale, NODE_NOISE_PERLIN, detail, 0);