[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51348] trunk/blender/intern/cycles/util/ util_transform.h: Fix #32844: cycles camera motion blur producing completely blurred frames sometimes.
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon Oct 15 19:56:40 CEST 2012
Revision: 51348
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51348
Author: blendix
Date: 2012-10-15 17:56:40 +0000 (Mon, 15 Oct 2012)
Log Message:
-----------
Fix #32844: cycles camera motion blur producing completely blurred frames sometimes.
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-10-15 17:52:09 UTC (rev 51347)
+++ trunk/blender/intern/cycles/util/util_transform.h 2012-10-15 17:56:40 UTC (rev 51348)
@@ -304,10 +304,18 @@
{
float costheta = dot(q1, q2);
+ /* rotate around shortest angle */
+ if(costheta < 0.0f) {
+ costheta = -costheta;
+ q1 = -q1;
+ }
+
if(costheta > 0.9995f) {
+ /* linear interpolation in degenerate case */
return normalize((1.0f - t)*q1 + t*q2);
}
else {
+ /* slerp */
float theta = acosf(clamp(costheta, -1.0f, 1.0f));
float thetap = theta * t;
float4 qperp = normalize(q2 - q1 * costheta);
More information about the Bf-blender-cvs
mailing list