Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-11-24 10:08:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-11-24 10:08:51 +0300
commit360d9acc0b057de60ce308b8d00c33eba15c8273 (patch)
tree8224ad190a15b3c7ab40ca09585799079612a069
parenta51f17bc305bcf4f01db9c330a1ec58ca8e3ef67 (diff)
backface culling wasnt working as it should in perspective view with the "Normal" option enabled.
-rw-r--r--source/blender/src/imagepaint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/src/imagepaint.c b/source/blender/src/imagepaint.c
index 5f88bd9b5b7..27d2bf3ab4a 100644
--- a/source/blender/src/imagepaint.c
+++ b/source/blender/src/imagepaint.c
@@ -2952,7 +2952,8 @@ static void project_paint_begin( ProjPaintState *ps, short mval[2])
}
} 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;
}
}