[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52658] trunk/blender/intern/cycles/util/ util_transform.h: Fix #33344: cycles motion blur was still crashing on CUDA sm 2.0.

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Nov 29 14:07:46 CET 2012


Revision: 52658
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52658
Author:   blendix
Date:     2012-11-29 13:07:45 +0000 (Thu, 29 Nov 2012)
Log Message:
-----------
Fix #33344: cycles motion blur was still crashing on CUDA sm 2.0. Solution now
is also an optimization, use quaternion nlerp instead of slerp, there's no good
reason to use slerp, and nlerp is faster too.

Modified Paths:
--------------
    trunk/blender/intern/cycles/util/util_transform.h

Modified: trunk/blender/intern/cycles/util/util_transform.h
===================================================================
--- trunk/blender/intern/cycles/util/util_transform.h	2012-11-29 12:22:07 UTC (rev 52657)
+++ trunk/blender/intern/cycles/util/util_transform.h	2012-11-29 13:07:45 UTC (rev 52658)
@@ -311,6 +311,10 @@
 
 __device_inline float4 quat_interpolate(float4 q1, float4 q2, float t)
 {
+	/* use simpe nlerp instead of slerp. it's faster and almost the same */
+	return normalize((1.0f - t)*q1 + t*q2);
+
+#if 0
 	/* note: this does not ensure rotation around shortest angle, q1 and q2
 	 * are assumed to be matched already in transform_motion_decompose */
 	float costheta = dot(q1, q2);
@@ -328,6 +332,7 @@
 		float thetap = theta * t;
 		return q1 * cosf(thetap) + qperp * sinf(thetap);
 	}
+#endif
 }
 
 __device_inline Transform transform_quick_inverse(Transform M)




More information about the Bf-blender-cvs mailing list