This commit is contained in:
2026-03-13 19:46:23 -04:00
parent 3a0d388502
commit 11eb69449d
5 changed files with 70 additions and 51 deletions

View File

@@ -1,26 +1,24 @@
# Implementation Plan: Frosted Glass Background Effect
# Implementation Plan: Frosted Glass Background Effect (REPAIR - TRUE GPU)
## Phase 1: Shader Development & Integration
- [ ] Task: Audit `src/shader_manager.py` to identify existing background/post-process integration points.
- [ ] Task: Write Tests: Verify `ShaderManager` can compile and bind a multi-pass blur shader.
- [ ] Task: Implement: Add `FrostedGlassShader` (GLSL) to `src/shader_manager.py`.
- [ ] Task: Implement: Integrate the blur shader into the `ShaderManager` lifecycle.
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Shader Development & Integration' (Protocol in workflow.md)
## Phase 1: Robust Shader & FBO Foundation
- [ ] Task: Implement: Create `ShaderManager` methods for downsampled FBO setup (scene, temp, blur).
- [ ] Task: Implement: Develop the "Deep Sea" background shader and integrate it as the FBO source.
- [ ] Task: Implement: Develop the 2-pass Gaussian blur shaders with a wide tap distribution.
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Robust Foundation' (Protocol in workflow.md)
## Phase 2: Framebuffer Capture Pipeline
- [ ] Task: Write Tests: Verify the FBO capture mechanism correctly samples the back buffer and stores it in a texture.
- [ ] Task: Implement: Update `src/shader_manager.py` or `src/gui_2.py` to handle "pre-rendering" of the background into a texture for blurring.
- [ ] Task: Implement: Ensure the blurred texture is updated every frame or on window move events.
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Framebuffer Capture Pipeline' (Protocol in workflow.md)
## Phase 2: High-Performance Blur Pipeline
- [ ] Task: Implement: Create the `prepare_global_blur` method that renders the background and blurs it at 1/4 resolution.
- [ ] Task: Implement: Ensure the pipeline correctly handles high-DPI scaling (`fb_scale`) for internal FBO dimensions.
- [ ] Task: Conductor - User Manual Verification 'Phase 2: High-Performance Pipeline' (Protocol in workflow.md)
## Phase 3: GUI Integration & Rendering
- [ ] Task: Write Tests: Verify that a mocked ImGui window successfully calls the frosted glass rendering logic.
- [ ] Task: Implement: Create a `_render_frosted_background(self, pos, size)` helper in `src/gui_2.py`.
- [ ] Task: Implement: Update panel rendering loops (e.g. `_gui_func`) to inject the frosted background before calling `imgui.begin()` for major panels.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: GUI Integration & Rendering' (Protocol in workflow.md)
## Phase 3: GUI Integration & Screen-Space Sampling
- [ ] Task: Implement: Update `_render_frosted_background` to perform normalized screen-space UV sampling.
- [ ] Task: Implement: Update `_begin_window` and `_end_window` to manage global transparency and call the blur renderer.
- [ ] Task: Implement: Apply the new window wrappers to all primary panels in `src/gui_2.py`.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: GUI Integration' (Protocol in workflow.md)
## Phase 4: UI Controls & Configuration
- [ ] Task: Write Tests: Verify that modifying blur uniforms via the Live Editor updates the shader state.
- [ ] Task: Implement: Add "Frosted Glass" sliders (Blur, Tint, Opacity) to the **Shader Editor** in `src/gui_2.py`.
- [ ] Task: Implement: Update `src/theme.py` to parse and store frosted glass settings from `config.toml`.
- [ ] Task: Conductor - User Manual Verification 'Phase 4: UI Controls & Configuration' (Protocol in workflow.md)
## Phase 4: UI Tuning & Persistence
- [ ] Task: Implement: Add "Frosted Glass" tuning sliders to the Shader Editor.
- [ ] Task: Implement: Update `src/theme_2.py` to persist all frosted glass settings.
- [ ] Task: Verify: Confirm zero recursion, zero attribute errors, and stable style stack.
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Final Polishing' (Protocol in workflow.md)