Fix #137539: Overlay: Sculpt overlays regression

Caused by 719351a9e6.
Each subpass needs a different blending mode.
This commit is contained in:
Miguel Pozo
2025-04-21 15:50:03 +02:00
parent 4f3413ff80
commit be0c0a29d8

View File

@@ -71,11 +71,10 @@ class Sculpts : Overlay {
sculpt_mask_.init();
sculpt_mask_.bind_ubo(OVERLAY_GLOBALS_SLOT, &res.globals_buf);
sculpt_mask_.bind_ubo(DRW_CLIPPING_UBO_SLOT, &res.clip_planes_buf);
sculpt_mask_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL |
DRW_STATE_BLEND_ALPHA,
state.clipping_plane_count);
{
auto &sub = sculpt_mask_.sub("Mesh");
sub.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_MUL,
state.clipping_plane_count);
sub.shader_set(res.shaders->sculpt_mesh.get());
sub.push_constant("maskOpacity", mask_opacity);
sub.push_constant("faceSetsOpacity", face_set_opacity);
@@ -83,6 +82,8 @@ class Sculpts : Overlay {
}
{
auto &sub = sculpt_mask_.sub("Curves");
sub.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA,
state.clipping_plane_count);
sub.shader_set(res.shaders->sculpt_curves.get());
sub.push_constant("selection_opacity", mask_opacity);
curves_ps_ = ⊂