[Bf-blender-cvs] [b2929dd] opensubdiv-modifier: OpenSubdiv: Fix issue with normals pointing to a wrong direction

Sergey Sharybin noreply at git.blender.org
Sat Jul 11 20:02:14 CEST 2015


Commit: b2929dd1c3324fdaa6df0aa46e4bdc62177a627f
Author: Sergey Sharybin
Date:   Fri Jul 10 12:39:13 2015 +0200
Branches: opensubdiv-modifier
https://developer.blender.org/rBb2929dd1c3324fdaa6df0aa46e4bdc62177a627f

OpenSubdiv: Fix issue with normals pointing to a wrong direction

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

M	source/blender/blenkernel/intern/CCGSubSurf.c

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

diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index f55b7bf..78bf4f8 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -2835,7 +2835,7 @@ static void opensubdiv_evaluateQuadFaceGrids(CCGSubSurf *ss,
 
 				VertDataCopy(co, P, ss);
 				if (do_normals) {
-					cross_v3_v3v3(no, dPdv, dPdu);
+					cross_v3_v3v3(no, dPdu, dPdv);
 					normalize_v3(no);
 				}
 
@@ -2905,7 +2905,7 @@ static void opensubdiv_evaluateQuadFaceGrids(CCGSubSurf *ss,
 			openSubdiv_evaluateLimit(ss->osd_evaluator, osd_face_index, u, v, P, dPdu, dPdv);
 			VertDataCopy(co, P, ss);
 			if (do_normals) {
-				cross_v3_v3v3(no, dPdv, dPdu);
+				cross_v3_v3v3(no, dPdu, dPdv);
 				normalize_v3(no);
 			}
 		}
@@ -2973,7 +2973,7 @@ static void opensubdiv_evaluateNGonFaceGrids(CCGSubSurf *ss,
 
 				VertDataCopy(co, P, ss);
 				if (do_normals) {
-					cross_v3_v3v3(no, dPdv, dPdu);
+					cross_v3_v3v3(no, dPdu, dPdv);
 					normalize_v3(no);
 				}




More information about the Bf-blender-cvs mailing list