[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55763] trunk/blender/intern/cycles/kernel /kernel_camera.h: Fix #34700: orthographic camera DOF was still not working correct.

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Apr 3 19:32:31 CEST 2013


Revision: 55763
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55763
Author:   blendix
Date:     2013-04-03 17:32:30 +0000 (Wed, 03 Apr 2013)
Log Message:
-----------
Fix #34700: orthographic camera DOF was still not working correct.

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/kernel_camera.h

Modified: trunk/blender/intern/cycles/kernel/kernel_camera.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_camera.h	2013-04-03 17:16:25 UTC (rev 55762)
+++ trunk/blender/intern/cycles/kernel/kernel_camera.h	2013-04-03 17:32:30 UTC (rev 55763)
@@ -53,7 +53,7 @@
 
 		/* 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 @@
 
 		/* 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 */




More information about the Bf-blender-cvs mailing list