diff options
author | Thomas Dinges <blender@dingto.org> | 2015-02-26 15:27:02 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2015-02-26 15:27:02 +0300 |
commit | 60679a171d8b14705f54c32873df87e5ed911b0a (patch) | |
tree | ab254c6e47dfdcf611b16757d6dbaeb7ea3dfd46 /intern/cycles/kernel/kernel_path.h | |
parent | f159ed77466fac81b7487231b5c0ed9314c250d4 (diff) |
Revert "Cleanup: Simplify camera sample motion blur code."
This reverts commit 8197f0bb645f73f41071daaccf205a7583e695f5.
Diffstat (limited to 'intern/cycles/kernel/kernel_path.h')
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index 9f3709ea5f7..151e762020b 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -1191,15 +1191,14 @@ ccl_device_inline void kernel_path_trace_setup(KernelGlobals *kg, ccl_global uin if(kernel_data.cam.aperturesize > 0.0f) path_rng_2D(kg, rng, sample, num_samples, PRNG_LENS_U, &lens_u, &lens_v); + float time = 0.0f; + #ifdef __CAMERA_MOTION__ - /* motion blur */ - if(kernel_data.cam.shuttertime == -1.0f) - ray->time = TIME_INVALID; - else - ray->time = path_rng_1D(kg, rng, sample, num_samples, PRNG_TIME); + if(kernel_data.cam.shuttertime != -1.0f) + time = path_rng_1D(kg, rng, sample, num_samples, PRNG_TIME); #endif - camera_sample(kg, x, y, filter_u, filter_v, lens_u, lens_v, ray); + camera_sample(kg, x, y, filter_u, filter_v, lens_u, lens_v, time, ray); } ccl_device void kernel_path_trace(KernelGlobals *kg, |