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:
authorAntony Riakiotakis <kalast@gmail.com>2015-11-13 23:57:00 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-11-13 23:58:30 +0300
commit4d33c37c9eb4fc46482f7b2a7227b54c5cfda07a (patch)
tree94302b76edc357977a3619eebaa5642c03c32161 /source/blender/blenkernel/intern/subsurf_ccg.c
parent92819425d86017f371fa8e78db54d4fb976a0235 (diff)
Fix T46726 shading issues in sculpt mode.
This fixes two issues: * Normals were not being recalculated correctly when not using optimized drawing for CDDerivedMesh (Multires actually handles that correctly). * Loop normals (autosmooth option) were also not being calculated. Doing this calculation is not desirable, since it can't be done correctly without a severe performance hit. This is easy to test by doing a dependency flush on the mesh after each scuplt stroke step. Instead they are now disabled during sculpting.
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf_ccg.c')
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index a2c625a7ec3..5814a06bb9f 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -1912,6 +1912,10 @@ static void ccgDM_buffer_copy_normal(
int shademodel;
int start = 0;
+ /* we are in sculpt mode, disable loop normals (since they won't get updated) */
+ if (ccgdm->pbvh)
+ lnors = NULL;
+
CCG_key_top_level(&key, ss);
for (i = 0; i < totface; i++) {