Fix T70466 Rendering error when drawing multi-material meshes
This commit is contained in:
parent
9a4042bed8
commit
11768d1c9f
Notes:
blender-bot
2023-02-14 03:59:42 +01:00
Referenced by issue #70478, 2.81 eevee/viewport -⚠️ Objects only display 1st material, all others are rendered invisible Referenced by issue #70466, Assigning different materials to different parts of a Mesh cause them to be transparent.
|
@ -878,6 +878,8 @@ void GPU_draw_list_submit(GPUDrawList *list)
|
|||
if (batch->elem) {
|
||||
GPUDrawCommandIndexed *cmd = list->commands_indexed;
|
||||
for (int i = 0; i < cmd_len; i++, cmd++) {
|
||||
/* Index start was added by Draw manager. Avoid counting it twice. */
|
||||
cmd->v_first -= batch->elem->index_start;
|
||||
GPU_batch_draw_advanced(batch, cmd->v_first, cmd->v_count, cmd->i_first, cmd->i_count);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue