Cycles: remove a few usages of double, to fix opencl warnings.

This commit is contained in:
Brecht Van Lommel 2012-04-30 10:03:13 +00:00
parent 281f50cfcc
commit f7078dcbe2
3 changed files with 5 additions and 5 deletions

@ -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 */

@ -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

@ -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))