[Bf-blender-cvs] [ff10ff782bd] master: Fix wrong sculpt flat shaded normals after recent optimizations
Brecht Van Lommel
noreply at git.blender.org
Sun Sep 29 23:43:48 CEST 2019
Commit: ff10ff782bde3395447deab4df4895ce270d3679
Author: Brecht Van Lommel
Date: Sun Sep 29 23:42:24 2019 +0200
Branches: master
https://developer.blender.org/rBff10ff782bde3395447deab4df4895ce270d3679
Fix wrong sculpt flat shaded normals after recent optimizations
===================================================================
M source/blender/gpu/intern/gpu_buffers.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index ce88b57420e..48f6ae87615 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -250,7 +250,6 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers,
/* calculate normal for each polygon only once */
uint mpoly_prev = UINT_MAX;
short no[3];
- int vbo_index = 0;
for (uint i = 0; i < buffers->face_indices_len; i++) {
const MLoopTri *lt = &buffers->looptri[buffers->face_indices[i]];
@@ -282,7 +281,7 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers,
const MVert *v = &mvert[vtri[j]];
copy_v3_v3(GPU_vertbuf_raw_step(&pos_step), v->co);
- copy_v3_v3_short(GPU_vertbuf_raw_step(&nor_step), v->no);
+ copy_v3_v3_short(GPU_vertbuf_raw_step(&nor_step), no);
if (show_mask) {
*(float *)GPU_vertbuf_raw_step(&msk_step) = fmask;
empty_mask = empty_mask && (fmask == 0.0f);
@@ -293,8 +292,6 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers,
const uchar *elem = &vcol[loop_index].r;
memcpy(GPU_vertbuf_raw_step(&col_step), elem, sizeof(uchar) * 4);
}
-
- vbo_index++;
}
}
}
More information about the Bf-blender-cvs
mailing list