[Bf-blender-cvs] [4932d833f16] temp-T97352-3d-texturing-seam-bleeding-b2: Fix: Prevent clipping of node drop shadow
Leon Schittek
noreply at git.blender.org
Tue Sep 20 10:32:14 CEST 2022
Commit: 4932d833f165871e60bc5eda466b359e1caa6582
Author: Leon Schittek
Date: Sun Sep 18 20:39:14 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB4932d833f165871e60bc5eda466b359e1caa6582
Fix: Prevent clipping of node drop shadow
Fix clipping artifacts of node drop shadows that could occur
on hidden nodes, when using higher UI scaling.
Reviewed By: Hans Goudey
Differential Revision: http://developer.blender.org/D16007
===================================================================
M source/blender/editors/interface/interface_draw.c
===================================================================
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 190830568e3..f1a324c411a 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -2307,9 +2307,6 @@ void UI_draw_box_shadow(const rctf *rect, uchar alpha)
void ui_draw_dropshadow(
const rctf *rct, float radius, float aspect, float alpha, int UNUSED(select))
{
- const float max_radius = (BLI_rctf_size_y(rct) - 10.0f) * 0.5f;
- const float rad = min_ff(radius, max_radius);
-
/* This undoes the scale of the view for higher zoom factors to clamp the shadow size. */
const float clamped_aspect = smoothminf(aspect, 1.0f, 0.5f);
@@ -2317,6 +2314,9 @@ void ui_draw_dropshadow(
const float shadow_offset = 0.5f * U.widget_unit * clamped_aspect;
const float shadow_alpha = 0.5f * alpha;
+ const float max_radius = (BLI_rctf_size_y(rct) - shadow_offset) * 0.5f;
+ const float rad = min_ff(radius, max_radius);
+
GPU_blend(GPU_BLEND_ALPHA);
uiWidgetBaseParameters widget_params = {
More information about the Bf-blender-cvs
mailing list