diff options
author | Thomas Dinges <blender@dingto.org> | 2013-05-12 21:14:01 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-05-12 21:14:01 +0400 |
commit | d46480377c733405554237adf64e1bce32b324fc (patch) | |
tree | b88f9b4a3ddf93414ee2bf1a23bc4993741496df | |
parent | 5637b0d39b007766a0131ca293a9f6f81bb4455b (diff) |
Cycles / Orthographic Camera:
* Avoid one unneeded division by 1.0f and save one variable assignment.
-rw-r--r-- | intern/cycles/kernel/kernel_camera.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h index 13f2f84691d..8bd09247339 100644 --- a/intern/cycles/kernel/kernel_camera.h +++ b/intern/cycles/kernel/kernel_camera.h @@ -109,8 +109,7 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa float2 lensuv = camera_sample_aperture(kg, lens_u, lens_v)*aperturesize; /* compute point on plane of focus */ - float ft = kernel_data.cam.focaldistance/ray->D.z; - float3 Pfocus = ray->D*ft; + float3 Pfocus = ray->D * kernel_data.cam.focaldistance; /* update ray for effect of lens */ float3 lensuvw = make_float3(lensuv.x, lensuv.y, 0.0f); |