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
committerPhilipp Oeser <info@graphics-engineer.com>2022-03-31 14:02:25 +0300
commita28d6a7b564a434dfa0610a65bf93569e3ccebd6 (patch)
treeee4e5c63cf196b0acdf3601c7105f537893cb4c0
parentf88646a1edcc69f216e59ee54d8555f7e3e2c9c6 (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 dccad081f64..5e398eb7137 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -646,10 +646,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);
}