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:
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 207956bc570..575c721bd54 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -1914,14 +1914,18 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
avgSharpness = 0;
}
- if (_edge_isBoundary(e) && (!e->numFaces || sharpCount < 2)) {
+ if (_edge_isBoundary(e)) {
for (x = 1; x < edgeSize - 1; x++) {
int fx = x * 2;
const float *co = EDGE_getCo(e, curLvl, x);
float *nCo = EDGE_getCo(e, nextLvl, fx);
+
+ /* Average previous level's endpoints */
VertDataCopy(r, EDGE_getCo(e, curLvl, x - 1), ss);
VertDataAdd(r, EDGE_getCo(e, curLvl, x + 1), ss);
VertDataMulN(r, 0.5f, ss);
+
+ /* nCo = nCo * 0.75 + r * 0.25 */
VertDataCopy(nCo, co, ss);
VertDataMulN(nCo, 0.75f, ss);
VertDataMulN(r, 0.25f, ss);