~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to intern/cycles/kernel/svm/svm_convert.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
        switch(type) {
26
26
                case NODE_CONVERT_FI: {
27
27
                        float f = stack_load_float(stack, from);
28
 
                        stack_store_int(stack, to, (int)f);
 
28
                        stack_store_int(stack, to, float_to_int(f));
29
29
                        break;
30
30
                }
31
31
                case NODE_CONVERT_FV: {
53
53
                }
54
54
                case NODE_CONVERT_VI: {
55
55
                        float3 f = stack_load_float3(stack, from);
56
 
                        int i = (f.x + f.y + f.z)*(1.0f/3.0f);
 
56
                        int i = (int)((f.x + f.y + f.z)*(1.0f/3.0f));
57
57
                        stack_store_int(stack, to, i);
58
58
                        break;
59
59
                }