diff options
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r-- | intern/cycles/kernel/svm/svm_noise.h | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_texture.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/svm/svm_noise.h b/intern/cycles/kernel/svm/svm_noise.h index 745744e142c..f41caa99772 100644 --- a/intern/cycles/kernel/svm/svm_noise.h +++ b/intern/cycles/kernel/svm/svm_noise.h @@ -143,9 +143,9 @@ __device float perlin_periodic(float x, float y, float z, float3 pperiod) int3 p; - p.x = fmaxf(quick_floor(pperiod.x), 1); - p.y = fmaxf(quick_floor(pperiod.y), 1); - p.z = fmaxf(quick_floor(pperiod.z), 1); + p.x = max(quick_floor(pperiod.x), 1); + p.y = max(quick_floor(pperiod.y), 1); + p.z = max(quick_floor(pperiod.z), 1); float u = fade(fx); float v = fade(fy); diff --git a/intern/cycles/kernel/svm/svm_texture.h b/intern/cycles/kernel/svm/svm_texture.h index c5f71c0d5bd..c5ded6d975f 100644 --- a/intern/cycles/kernel/svm/svm_texture.h +++ b/intern/cycles/kernel/svm/svm_texture.h @@ -64,12 +64,12 @@ __device void voronoi(float3 p, NodeDistanceMetric distance_metric, float e, flo for(xx = xi-1; xx <= xi+1; xx++) { for(yy = yi-1; yy <= yi+1; yy++) { for(zz = zi-1; zz <= zi+1; zz++) { - float3 ip = make_float3(xx, yy, zz); + float3 ip = make_float3((float)xx, (float)yy, (float)zz); float3 vp = cellnoise_color(ip); float3 pd = p - (vp + ip); float d = voronoi_distance(distance_metric, pd, e); - vp += make_float3(xx, yy, zz); + vp += make_float3((float)xx, (float)yy, (float)zz); if(d < da[0]) { da[3] = da[2]; |