diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-30 14:03:13 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-30 14:03:13 +0400 |
commit | f7078dcbe270dcdf1da25c75f1dbb4a04acfdea3 (patch) | |
tree | b30f34d649a3e088834a405fabd67aaea7dc79d5 /intern/cycles | |
parent | 281f50cfcc644148366d58362403d83efeefb62f (diff) |
Cycles: remove a few usages of double, to fix opencl warnings.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/kernel_camera.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_compat_opencl.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_gamma.h | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h index 58c482212df..99dac18d545 100644 --- a/intern/cycles/kernel/kernel_camera.h +++ b/intern/cycles/kernel/kernel_camera.h @@ -130,7 +130,7 @@ __device void camera_sample_environment(KernelGlobals *kg, float raster_x, float float3 Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y, 0.0f)); /* create ray form raster position */ - ray->P = make_float3(0.0, 0.0f, 0.0f); + ray->P = make_float3(0.0f, 0.0f, 0.0f); ray->D = equirectangular_to_direction(Pcamera.x, Pcamera.y); /* transform ray from camera to world */ diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h index 9fbd8566ecd..a9d18588cc8 100644 --- a/intern/cycles/kernel/kernel_compat_opencl.h +++ b/intern/cycles/kernel/kernel_compat_opencl.h @@ -78,7 +78,7 @@ __device float kernel_tex_interp_(__global float *data, int width, float x) #define make_float2(x, y) ((float2)(x, y)) #ifdef __CL_NO_FLOAT3__ -#define make_float3(x, y, z) ((float4)(x, y, z, 0.0)) +#define make_float3(x, y, z) ((float4)(x, y, z, 0.0f)) #else #define make_float3(x, y, z) ((float3)(x, y, z)) #endif diff --git a/intern/cycles/kernel/svm/svm_gamma.h b/intern/cycles/kernel/svm/svm_gamma.h index 4a8967011c7..c62a01a2d58 100644 --- a/intern/cycles/kernel/svm/svm_gamma.h +++ b/intern/cycles/kernel/svm/svm_gamma.h @@ -23,11 +23,11 @@ __device void svm_node_gamma(ShaderData *sd, float *stack, uint in_gamma, uint i float3 color = stack_load_float3(stack, in_color); float gamma = stack_load_float(stack, in_gamma); - if (color.x > 0.0) + if (color.x > 0.0f) color.x = powf(color.x, gamma); - if (color.y > 0.0) + if (color.y > 0.0f) color.y = powf(color.y, gamma); - if (color.z > 0.0) + if (color.z > 0.0f) color.z = powf(color.z, gamma); if (stack_valid(out_color)) |