perf(theme): drop the redundant acrylic grain under glass cards
Glass cards draw their own grain layer over the surface overlay, but the acrylic primitive beneath them was also drawing its grain. That lower layer sits under the overlay at well below one grey level, so it is invisible and only costs an extra noise pass per card. - The card now asks the acrylic primitive for zero grain and keeps its own visible grain layer, removing the redundant pass with no visible change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -741,9 +741,11 @@ inline void DrawGlassPanel(ImDrawList* dl, const ImVec2& pMin,
|
||||
// (skip the blur pass at 100% for performance)
|
||||
if (uiOp < 0.99f) {
|
||||
if (useAcrylic) {
|
||||
const auto& acrylicTheme = GetCurrentAcrylicTheme();
|
||||
effects::ImGuiAcrylic::DrawAcrylicRect(dl, pMin, pMax,
|
||||
acrylicTheme.card, spec.rounding);
|
||||
// The card draws its own grain layer below (noise B, over the surface overlay), so skip
|
||||
// the acrylic primitive's grain here: it sits under the overlay at < 1 grey level.
|
||||
effects::AcrylicParams cardParams = GetCurrentAcrylicTheme().card;
|
||||
cardParams.noiseOpacity = 0.0f;
|
||||
effects::ImGuiAcrylic::DrawAcrylicRect(dl, pMin, pMax, cardParams, spec.rounding);
|
||||
} else {
|
||||
// Lightweight fake-glass: translucent fill
|
||||
ImU32 fill = (spec.fillAlpha == 18) ? s_glassFill : ScaleAlpha(s_glassFill, spec.fillAlpha / 18.0f);
|
||||
|
||||
Reference in New Issue
Block a user