Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/geom/geom_object.h4
-rw-r--r--intern/cycles/kernel/kernel_camera.h42
2 files changed, 14 insertions, 32 deletions
diff --git a/intern/cycles/kernel/geom/geom_object.h b/intern/cycles/kernel/geom/geom_object.h
index 0b410f448c8..3fbceded261 100644
--- a/intern/cycles/kernel/geom/geom_object.h
+++ b/intern/cycles/kernel/geom/geom_object.h
@@ -96,10 +96,10 @@ ccl_device_inline Transform object_fetch_vector_transform(KernelGlobals *kg, int
#ifdef __OBJECT_MOTION__
ccl_device_inline Transform object_fetch_transform_motion(KernelGlobals *kg, int object, float time)
{
- MotionTransform motion = kernel_tex_fetch(__objects, object).tfm;
+ const ccl_global MotionTransform *motion = &kernel_tex_fetch(__objects, object).tfm;
Transform tfm;
- transform_motion_interpolate(&tfm, &motion, time);
+ transform_motion_interpolate(&tfm, motion, time);
return tfm;
}
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h
index 96cdb04d955..66ed9f5fc0f 100644
--- a/intern/cycles/kernel/kernel_camera.h
+++ b/intern/cycles/kernel/kernel_camera.h
@@ -92,16 +92,10 @@ ccl_device void camera_sample_perspective(KernelGlobals *kg, float raster_x, flo
#ifdef __CAMERA_MOTION__
if(kernel_data.cam.have_motion) {
-# ifdef __KERNEL_OPENCL__
- const MotionTransform tfm = kernel_data.cam.motion;
- transform_motion_interpolate(&cameratoworld,
- &tfm,
- ray->time);
-# else
- transform_motion_interpolate(&cameratoworld,
- &kernel_data.cam.motion,
- ray->time);
-# endif
+ ccl_constant MotionTransform *motion = &kernel_data.cam.motion;
+ transform_motion_interpolate_constant(&cameratoworld,
+ motion,
+ ray->time);
}
#endif
@@ -204,16 +198,10 @@ ccl_device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, fl
#ifdef __CAMERA_MOTION__
if(kernel_data.cam.have_motion) {
-# ifdef __KERNEL_OPENCL__
- const MotionTransform tfm = kernel_data.cam.motion;
- transform_motion_interpolate(&cameratoworld,
- &tfm,
- ray->time);
-# else
- transform_motion_interpolate(&cameratoworld,
- &kernel_data.cam.motion,
- ray->time);
-# endif
+ ccl_constant MotionTransform *motion = &kernel_data.cam.motion;
+ transform_motion_interpolate_constant(&cameratoworld,
+ motion,
+ ray->time);
}
#endif
@@ -282,16 +270,10 @@ ccl_device_inline void camera_sample_panorama(ccl_constant KernelCamera *cam,
#ifdef __CAMERA_MOTION__
if(cam->have_motion) {
-# ifdef __KERNEL_OPENCL__
- const MotionTransform tfm = cam->motion;
- transform_motion_interpolate(&cameratoworld,
- &tfm,
- ray->time);
-# else
- transform_motion_interpolate(&cameratoworld,
- &cam->motion,
- ray->time);
-# endif
+ ccl_constant MotionTransform *motion = &cam->motion;
+ transform_motion_interpolate_constant(&cameratoworld,
+ motion,
+ ray->time);
}
#endif