diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-04-06 15:52:40 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-04-06 15:52:40 +0400 |
commit | 92b6365e219a341800dcfc0582045fa366ae6222 (patch) | |
tree | 5622196daf09b04c1db4d4267b19459b2df70ef1 /intern/cycles | |
parent | 2d76a828ca5ff8305a959079318176eda6d0d17d (diff) |
fix: #34871 Cycles/CUDA/sm_35: Build problems probably due to issues with float3 operators (on windows?)
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/kernel_camera.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h index 800daf40887..fe31419b11e 100644 --- a/intern/cycles/kernel/kernel_camera.h +++ b/intern/cycles/kernel/kernel_camera.h @@ -100,7 +100,6 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa Transform rastertocamera = kernel_data.cam.rastertocamera; float3 Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y, 0.0f)); - ray->P = Pcamera; ray->D = make_float3(0.0f, 0.0f, 1.0f); /* modify ray for depth of field */ @@ -116,11 +115,12 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa /* update ray for effect of lens */ float3 lensuvw = make_float3(lensuv.x, lensuv.y, 0.0f); - - ray->P += lensuvw; + ray->P = Pcamera + lensuvw; ray->D = normalize(Pfocus - lensuvw); } - + else { + ray->P = Pcamera; + } /* transform ray from camera to world */ Transform cameratoworld = kernel_data.cam.cameratoworld; |