diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-17 16:55:23 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-17 16:55:23 +0400 |
commit | d08b06f773c754c70886901b8964c8093f920a75 (patch) | |
tree | 3c600751999c7d827513019f8f5557d3e2c29e58 /intern/cycles/kernel/kernel_object.h | |
parent | afb75ad2af0c30f1bc6fd252ca115a59d04e3b85 (diff) |
Cycles: motion blur is now curved and passes exactly through the midpoint.
Previously it would only interpolate between the previous and next frame,
which meant it might not hit the current frame position.
Diffstat (limited to 'intern/cycles/kernel/kernel_object.h')
-rw-r--r-- | intern/cycles/kernel/kernel_object.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/intern/cycles/kernel/kernel_object.h b/intern/cycles/kernel/kernel_object.h index 602574cb736..79ff7e2020a 100644 --- a/intern/cycles/kernel/kernel_object.h +++ b/intern/cycles/kernel/kernel_object.h @@ -23,8 +23,9 @@ enum ObjectTransform { OBJECT_INVERSE_TRANSFORM = 3, OBJECT_PROPERTIES = 6, OBJECT_TRANSFORM_MOTION_PRE = 8, - OBJECT_TRANSFORM_MOTION_POST = 12, - OBJECT_DUPLI = 16 + OBJECT_TRANSFORM_MOTION_MID = 12, + OBJECT_TRANSFORM_MOTION_POST = 16, + OBJECT_DUPLI = 18 }; __device_inline Transform object_fetch_transform(KernelGlobals *kg, int object, enum ObjectTransform type) @@ -59,11 +60,15 @@ __device_inline Transform object_fetch_transform_motion(KernelGlobals *kg, int o motion.pre.z = kernel_tex_fetch(__objects, offset + 2); motion.pre.w = kernel_tex_fetch(__objects, offset + 3); + motion.mid.x = kernel_tex_fetch(__objects, offset + 4); + motion.mid.y = kernel_tex_fetch(__objects, offset + 5); + motion.mid.z = kernel_tex_fetch(__objects, offset + 6); + motion.mid.w = kernel_tex_fetch(__objects, offset + 7); - motion.post.x = kernel_tex_fetch(__objects, offset + 4); - motion.post.y = kernel_tex_fetch(__objects, offset + 5); - motion.post.z = kernel_tex_fetch(__objects, offset + 6); - motion.post.w = kernel_tex_fetch(__objects, offset + 7); + motion.post.x = kernel_tex_fetch(__objects, offset + 8); + motion.post.y = kernel_tex_fetch(__objects, offset + 9); + motion.post.z = kernel_tex_fetch(__objects, offset + 10); + motion.post.w = kernel_tex_fetch(__objects, offset + 11); transform_motion_interpolate(&tfm, &motion, time); |