Fix #114841: Sculpt Multires drawing broken with no mask

The GPU buffer type was replaced with `float` in 4151691552,
but the "no mask" case wasn't changed. We still assigned a `uchar` value
to a `float` pointer, which made the drawing look random. Instead do the
same fill we use for other PBVH types.

Pull Request: https://projects.blender.org/blender/blender/pulls/114846
This commit is contained in:
Hans Goudey
2023-11-14 16:28:46 +01:00
committed by Hans Goudey
parent 0bec7f7360
commit 1a8b5bcd43

View File

@@ -569,10 +569,9 @@ struct PBVHBatches {
});
}
else {
foreach_grids(
[&](int /*x*/, int /*y*/, int /*grid_index*/, CCGElem * /*elems*/[4], int /*i*/) {
*static_cast<uchar *>(GPU_vertbuf_raw_step(&access)) = 0;
});
MutableSpan(static_cast<float *>(GPU_vertbuf_get_data(vbo.vert_buf)),
GPU_vertbuf_get_vertex_len(vbo.vert_buf))
.fill(0.0f);
}
}
else if (vbo.type == CD_PBVH_FSET_TYPE) {