Sculpt: Fix draw artifacts when drawing multires mask
This commit is contained in:
parent
010c10febe
commit
c207571d44
|
@ -389,12 +389,18 @@ struct PBVHBatches {
|
|||
break;
|
||||
|
||||
case CD_PBVH_MASK_TYPE:
|
||||
foreach_grids([&](int /*x*/, int /*y*/, int /*grid_index*/, CCGElem *elems[4], int i) {
|
||||
float *mask = CCG_elem_mask(&args->ccg_key, elems[i]);
|
||||
if (args->ccg_key.has_mask) {
|
||||
foreach_grids([&](int /*x*/, int /*y*/, int /*grid_index*/, CCGElem *elems[4], int i) {
|
||||
float *mask = CCG_elem_mask(&args->ccg_key, elems[i]);
|
||||
|
||||
*static_cast<uchar *>(GPU_vertbuf_raw_step(&access)) = mask ? uchar(*mask * 255.0f) :
|
||||
255;
|
||||
});
|
||||
*static_cast<uchar *>(GPU_vertbuf_raw_step(&access)) = uchar(*mask * 255.0f);
|
||||
});
|
||||
}
|
||||
else {
|
||||
foreach_grids([&](int /*x*/, int /*y*/, int /*grid_index*/, CCGElem *elems[4], int i) {
|
||||
*static_cast<uchar *>(GPU_vertbuf_raw_step(&access)) = 0;
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case CD_PBVH_FSET_TYPE: {
|
||||
|
|
Loading…
Reference in New Issue