diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-11 12:12:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-11 12:45:35 +0300 |
commit | ebe306b8d2d0377705f9e3d66fe71465ab14d210 (patch) | |
tree | 788257bfd22d966aae2ccc59d9cba3a15c431774 /intern | |
parent | c149b6b7d72f9d399a8e49160be8a2788b3f2c0e (diff) |
Cycles: Cleanup, redundant normalization
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_camera.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h index cddb87d0cc0..e116ec394ac 100644 --- a/intern/cycles/kernel/kernel_camera.h +++ b/intern/cycles/kernel/kernel_camera.h @@ -115,18 +115,16 @@ ccl_device void camera_sample_perspective(KernelGlobals *kg, float raster_x, flo /* ray differential */ ray->dP = differential3_zero(); - const float3 Ddiff = normalize(ray->D); - tP = transform_perspective(&rastertocamera, make_float3(raster_x + 1.0f, raster_y, 0.0f)); tD = transform_direction(&cameratoworld, tP); Pcamera = spherical_stereo_position(kg, tD, tP); - ray->dD.dx = normalize(spherical_stereo_direction(kg, tD, tP, Pcamera)) - Ddiff; + ray->dD.dx = normalize(spherical_stereo_direction(kg, tD, tP, Pcamera)) - ray->D; ray->dP.dx = Pcamera - ray->P; tP = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y + 1.0f, 0.0f)); tD = transform_direction(&cameratoworld, tP); Pcamera = spherical_stereo_position(kg, tD, tP); - ray->dD.dy = normalize(spherical_stereo_direction(kg, tD, tP, Pcamera)) - Ddiff; + ray->dD.dy = normalize(spherical_stereo_direction(kg, tD, tP, Pcamera)) - ray->D; /* dP.dy is zero, since the omnidirectional panorama only shift the eyes horizontally */ #endif |