Files
2026-03-13 19:46:23 -04:00

1.8 KiB

Specification: Frosted Glass Background Effect (REPAIR - TRUE GPU)

Overview

Implement a high-fidelity "frosted glass" (acrylic) background effect using a dedicated OpenGL pipeline. This implementation follows professional rendering patterns (downsampling, multi-pass blurring, and screen-space sampling) to ensure a smooth, milky look that remains performant on high-DPI displays.

Functional Requirements

  • Dedicated Background Pipeline:
    • Render the animated "Deep Sea" background shader to an off-screen SceneFBO once per frame.
  • Multi-Scale Downsampled Blur:
    • Downsample the SceneFBO texture to 1/4 or 1/8 resolution.
    • Perform 2-pass Gaussian blurring on the downsampled texture to achieve a creamy "milky" aesthetic.
  • ImGui Panel Integration:
    • Each ImGui panel must sample its background from the blurred texture using screen-space UV coordinates.
    • Automatically force window transparency (alpha 0.0) when the effect is active.
  • Real-Time Shader Tuning:
    • Control blur radius, tint intensity, and opacity via the Live Shader Editor.
  • Stability:
    • Balanced style-stack management to prevent ImGui assertion crashes.
    • Strict 1-space indentation and class scope protection.

Technical Implementation

  • FBO Management: Persistent FBOs for scene, temp, and blur textures.
  • UV Math: (window_pos / screen_res) mapping to handle high-DPI scaling and vertical flipping.
  • DrawList Callbacks: (If necessary) use callbacks to ensure the background is ready before panels draw.

Acceptance Criteria

  • Toggling the effect does not crash the app.
  • Windows show a deep, high-quality blur of the background shader.
  • Blur follows windows perfectly during drag/resize.
  • The "Milky" look is highly visible even at low radii.