diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-03 21:32:30 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-03 21:32:30 +0400 |
commit | 4c8e70d049828d46fa0615258837b217a58b370d (patch) | |
tree | a15e112afd99d67b144b0cc97ca0064fad5fea59 /intern/cycles/kernel | |
parent | e6a16e585cd30aa540550b9ac76ba630daf03fe8 (diff) |
Fix #34700: orthographic camera DOF was still not working correct.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/kernel_camera.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h index e26addd19e4..694ef8bd01d 100644 --- a/intern/cycles/kernel/kernel_camera.h +++ b/intern/cycles/kernel/kernel_camera.h @@ -53,7 +53,7 @@ __device void camera_sample_perspective(KernelGlobals *kg, float raster_x, float /* compute point on plane of focus */ float ft = kernel_data.cam.focaldistance/ray->D.z; - float3 Pfocus = ray->P + ray->D*ft; + float3 Pfocus = ray->D*ft; /* update ray for effect of lens */ ray->P = make_float3(lensuv.x, lensuv.y, 0.0f); @@ -112,11 +112,13 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa /* compute point on plane of focus */ float ft = kernel_data.cam.focaldistance/ray->D.z; - float3 Pfocus = ray->P + ray->D*ft; + float3 Pfocus = ray->D*ft; /* update ray for effect of lens */ ray->P = make_float3(lensuv.x, lensuv.y, 0.0f); ray->D = normalize(Pfocus - ray->P); + + ray->P += Pcamera; } /* transform ray from camera to world */ |