Fix T75311, T75310: Edit Weight Paint Overlay Render Artifacts
During recent refactoring of the edit weight overlay we moved a assignment before it was valid. Making everything one frame off what resulted in a flashing frame during TAA, not drawing the overlay until a second action happened, making overlays too bright. The reason whas that the painting overlay wasn't initialized in the first sample, but the draw passes and groups were filled. Resulting in rendering the overlay twice or not at all. This change moves the assignment to where it is valid.
This commit is contained in:
parent
999134b7ca
commit
480ff89bf7
Notes:
blender-bot
2023-02-14 10:35:28 +01:00
Referenced by issue #75310, Edit Vertex Group Weight Overlay Renders Too Bright Referenced by issue #75311, Edit Vertex Group Weight Overlay Doesn't show Directly
|
@ -106,11 +106,12 @@ static void OVERLAY_cache_init(void *vedata)
|
|||
OVERLAY_Data *data = vedata;
|
||||
OVERLAY_StorageList *stl = data->stl;
|
||||
OVERLAY_PrivateData *pd = stl->pd;
|
||||
const bool draw_edit_weights = (pd->edit_mesh.flag & V3D_OVERLAY_EDIT_WEIGHT);
|
||||
|
||||
switch (pd->ctx_mode) {
|
||||
case CTX_MODE_EDIT_MESH:
|
||||
OVERLAY_edit_mesh_cache_init(vedata);
|
||||
/* `pd->edit_mesh.flag` is valid after calling `OVERLAY_edit_mesh_cache_init`. */
|
||||
const bool draw_edit_weights = (pd->edit_mesh.flag & V3D_OVERLAY_EDIT_WEIGHT);
|
||||
if (draw_edit_weights) {
|
||||
OVERLAY_paint_cache_init(vedata);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue