[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17549] branches/projection-paint/source/ blender/src/imagepaint.c: backface culling wasnt working as it should in perspective view with the " Normal" option enabled.
Campbell Barton
ideasman42 at gmail.com
Mon Nov 24 08:08:51 CET 2008
Revision: 17549
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17549
Author: campbellbarton
Date: 2008-11-24 08:08:51 +0100 (Mon, 24 Nov 2008)
Log Message:
-----------
backface culling wasnt working as it should in perspective view with the "Normal" option enabled.
Modified Paths:
--------------
branches/projection-paint/source/blender/src/imagepaint.c
Modified: branches/projection-paint/source/blender/src/imagepaint.c
===================================================================
--- branches/projection-paint/source/blender/src/imagepaint.c 2008-11-24 05:58:00 UTC (rev 17548)
+++ branches/projection-paint/source/blender/src/imagepaint.c 2008-11-24 07:08:51 UTC (rev 17549)
@@ -2952,7 +2952,8 @@
}
} else {
VecSubf(viewDirPersp, ps->viewPos, v->co);
- if (NormalizedVecAngle2(ps->viewDir, no) >= M_PI_2) { /* 1 vert of this face is towards us */
+ Normalize(viewDirPersp);
+ if (NormalizedVecAngle2(viewDirPersp, no) >= M_PI_2) { /* 1 vert of this face is towards us */
ps->vertFlags[a] |= PROJ_VERT_CULL;
}
}
More information about the Bf-blender-cvs
mailing list