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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-07 20:06:17 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-07 20:06:17 +0400
commitd835d2f4e65ae3bf8e22f8d3d60e7e6ea7a6b4ca (patch)
tree77475cb0eec4dda28415b6c9f6be51df28acf286 /intern/cycles/kernel/svm/svm_texture.h
parentc24be7ec6e5269c54552d1fb03707b97befd48d1 (diff)
Code cleanup: avoid some warnings due to implicit uint/int/float/double conversion.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_texture.h')
-rw-r--r--intern/cycles/kernel/svm/svm_texture.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/svm/svm_texture.h b/intern/cycles/kernel/svm/svm_texture.h
index a4f6691435c..ba5b772b3a1 100644
--- a/intern/cycles/kernel/svm/svm_texture.h
+++ b/intern/cycles/kernel/svm/svm_texture.h
@@ -51,9 +51,9 @@ __device_noinline float4 voronoi_Fn(float3 p, float e, int n1, int n2)
/* returns distances in da and point coords in pa */
int xx, yy, zz, xi, yi, zi;
- xi = (int)floorf(p.x);
- yi = (int)floorf(p.y);
- zi = (int)floorf(p.z);
+ xi = floor_to_int(p.x);
+ yi = floor_to_int(p.y);
+ zi = floor_to_int(p.z);
da[0] = 1e10f;
da[1] = 1e10f;
@@ -186,7 +186,7 @@ __device float noise_wave(NodeWaveBasis wave, float a)
}
else if(wave == NODE_WAVE_SAW) {
float b = 2.0f*M_PI_F;
- int n = (int)(a / b);
+ int n = float_to_int(a / b);
a -= n*b;
if(a < 0.0f) a += b;
@@ -212,7 +212,7 @@ __device_noinline float noise_turbulence(float3 p, NodeNoiseBasis basis, float o
int i, n;
octaves = clamp(octaves, 0.0f, 16.0f);
- n = (int)octaves;
+ n = float_to_int(octaves);
for(i = 0; i <= n; i++) {
float t = noise_basis(fscale*p, basis);