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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-03-31 12:52:46 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-03-31 12:52:46 +0300
commitdc73c71b3b9b84663bc2ad7c15a890f509f27d83 (patch)
tree57e19f92e50c0fb87922a6d7805daf75dd5ff6e1
parent7e54f5c2184a74fa466ac295a53be0311b221431 (diff)
Fix T96915: GPU subdivision modifier: Smooth Shade doesn't work
Simple error in an earlier commit, the flags should be or-ed.
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index e92f354642c..2653035a39f 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -631,10 +631,10 @@ static void draw_subdiv_cache_extra_coarse_face_data_mesh(Mesh *mesh, uint32_t *
for (int i = 0; i < mesh->totpoly; i++) {
uint32_t flag = 0;
if ((mesh->mpoly[i].flag & ME_SMOOTH) != 0) {
- flag = SUBDIV_COARSE_FACE_FLAG_SMOOTH;
+ flag |= SUBDIV_COARSE_FACE_FLAG_SMOOTH;
}
if ((mesh->mpoly[i].flag & ME_FACE_SEL) != 0) {
- flag = SUBDIV_COARSE_FACE_FLAG_SELECT;
+ flag |= SUBDIV_COARSE_FACE_FLAG_SELECT;
}
flags_data[i] = (uint)(mesh->mpoly[i].loopstart) | (flag << SUBDIV_COARSE_FACE_FLAG_OFFSET);
}