From cee918fe7a8bc98780f73773620e47d01421a0e7 Mon Sep 17 00:00:00 2001 From: Shirona1337 Date: Fri, 22 May 2026 13:05:59 +0800 Subject: [PATCH] fix(gui): add frosted-glass blur behind PanelClickGui panel and search bar The panel and search-bar backgrounds were calling TextGlow.drawBackground only, which paints two translucent rounded rects (a dark base + a thin white overlay). The original visual is supposed to be a frosted-glass blur of the gameplay behind it -- the blur shader was loaded and wired up via RenderUtil.drawBlurredRect (blits the main render target into a TextureTarget, then samples it through the 'blur' shader from ShaderSource), but nothing was actually invoking it. Call RenderUtil.drawBlurredRect right before TextGlow.drawBackground in both drawPanelGlow and drawSearchBar, using the existing radius and effective alpha so the blur fades in alongside the panel open animation. The shader assets (blur.fsh / blur.vsh / common.glsl) are embedded in ShaderSource enum, so no extra resource files are needed. Co-Authored-By: Claude Opus 4.7 --- src/main/java/shit/zen/gui/PanelClickGui.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/shit/zen/gui/PanelClickGui.java b/src/main/java/shit/zen/gui/PanelClickGui.java index 84be97b..ac22b94 100644 --- a/src/main/java/shit/zen/gui/PanelClickGui.java +++ b/src/main/java/shit/zen/gui/PanelClickGui.java @@ -190,7 +190,9 @@ extends Screen { private void drawPanelGlow(GuiGraphics guiGraphics, int panelX, int panelY, float partialTicks, float alpha) { int panelWidth = (int)(600.0f * this.currentScale); int panelHeight = (int)(400.0f * this.currentScale); - TextGlow.drawBackground(guiGraphics.pose(), panelX, panelY, panelWidth, panelHeight, 12.0f * this.currentScale, alpha); + float radius = 12.0f * this.currentScale; + RenderUtil.drawBlurredRect(guiGraphics.pose(), panelX, panelY, panelWidth, panelHeight, radius, 8.0f, alpha, 0); + TextGlow.drawBackground(guiGraphics.pose(), panelX, panelY, panelWidth, panelHeight, radius, alpha); } public boolean mouseClicked(double mouseX, double mouseY, int button) { @@ -375,7 +377,9 @@ extends Screen { int searchHeight = (int)(20.0f * this.currentScale); int searchX = panelX + (panelWidth - searchWidth) / 2; int searchY = panelY + panelHeight + (int)(15.0f * this.currentScale); - TextGlow.drawBackground(guiGraphics.pose(), searchX, searchY, searchWidth, searchHeight, 8.0f * this.currentScale, alpha); + float searchRadius = 8.0f * this.currentScale; + RenderUtil.drawBlurredRect(guiGraphics.pose(), searchX, searchY, searchWidth, searchHeight, searchRadius, 8.0f, alpha, 0); + TextGlow.drawBackground(guiGraphics.pose(), searchX, searchY, searchWidth, searchHeight, searchRadius, alpha); Renderer.renderConsumer((drawContext -> { FontRenderer iconFont = FontPresets.materialIcons(20.0f * this.currentScale); String iconText = "\uE8B6";