Fix T78188: Sculpt mask glitching after using sculpt vertex colors
The face sets color copy to the GPU was done outside of the loop, probably after a merge error in a rebase. Also, the default color was initialized using the wrong type. Reviewed By: sergey Maniphest Tasks: T78188 Differential Revision: https://developer.blender.org/D8106
This commit is contained in:
parent
0f7851ee79
commit
2b522e3345
Notes:
blender-bot
2023-02-14 06:45:14 +01:00
Referenced by issue #78188, Sculpt mask painting provides heavy shading glitches (today regression)
|
@ -316,7 +316,7 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers,
|
|||
empty_mask = empty_mask && (cmask == 0);
|
||||
/* Vertex Colors. */
|
||||
if (show_vcol) {
|
||||
ushort scol[4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
ushort scol[4] = {USHRT_MAX, USHRT_MAX, USHRT_MAX, USHRT_MAX};
|
||||
if (vtcol) {
|
||||
scol[0] = unit_float_to_ushort_clamp(vtcol[vtri[j]].color[0]);
|
||||
scol[1] = unit_float_to_ushort_clamp(vtcol[vtri[j]].color[1]);
|
||||
|
@ -334,10 +334,9 @@ void GPU_pbvh_mesh_buffers_update(GPU_PBVH_Buffers *buffers,
|
|||
memcpy(GPU_vertbuf_raw_step(&col_step), scol, sizeof(scol));
|
||||
}
|
||||
}
|
||||
/* Face Sets. */
|
||||
memcpy(GPU_vertbuf_raw_step(&fset_step), face_set_color, sizeof(uchar) * 3);
|
||||
}
|
||||
|
||||
/* Face Sets. */
|
||||
memcpy(GPU_vertbuf_raw_step(&fset_step), face_set_color, sizeof(uchar) * 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue