Cycles:
[blender.git] / intern / cycles / kernel / svm / svm_convert.h
index 0050813e2c04262c7af8df8cc91a190abdbe206b..450344c79ff35388fbb1f578e8a2cca0e7d576b1 100644 (file)
@@ -25,7 +25,7 @@ __device void svm_node_convert(ShaderData *sd, float *stack, uint type, uint fro
        switch(type) {
                case NODE_CONVERT_FI: {
                        float f = stack_load_float(stack, from);
-                       stack_store_int(stack, to, (int)f);
+                       stack_store_int(stack, to, float_to_int(f));
                        break;
                }
                case NODE_CONVERT_FV: {