[Bf-blender-cvs] [8adeae6] hair_system: Fix for smoothing iterator: Frame rotation was disabled for angles > 90 degrees, due to missing abs() call.

Lukas Tönne noreply at git.blender.org
Thu Aug 7 15:23:08 CEST 2014


Commit: 8adeae602961aa518b00d83a84586b9245bec4c2
Author: Lukas Tönne
Date:   Thu Aug 7 15:23:01 2014 +0200
Branches: hair_system
https://developer.blender.org/rB8adeae602961aa518b00d83a84586b9245bec4c2

Fix for smoothing iterator: Frame rotation was disabled for angles > 90
degrees, due to missing abs() call.

===================================================================

M	source/blender/hair/intern/HAIR_smoothing.h

===================================================================

diff --git a/source/blender/hair/intern/HAIR_smoothing.h b/source/blender/hair/intern/HAIR_smoothing.h
index feb4952..69837cb 100644
--- a/source/blender/hair/intern/HAIR_smoothing.h
+++ b/source/blender/hair/intern/HAIR_smoothing.h
@@ -138,7 +138,7 @@ struct FrameIterator {
 		
 		float3 C = cross_v3_v3(prev_dir, m_dir);
 		float D = dot_v3v3(prev_dir, m_dir);
-		if (D > epsilon && fabsf(D) < 1.0f - epsilon) {
+		if (fabsf(D) > epsilon && fabsf(D) < 1.0f - epsilon) {
 			/* half angle sine, cosine */
 			D = sqrtf((1.0f + D) * 0.5f);
 			C = C / D * 0.5f;




More information about the Bf-blender-cvs mailing list