# Specification: Custom Shader and Window Frame Support

## Overview
Implement proper custom shader support for post-process rendering and backgrounds within the Manual Slop GUI (using Dear PyGui/imgui-bundle). Additionally, investigate and implement a method to overload or replace the default OS window frame to ensure it matches the application's theme.

## Functional Requirements
- **Shader Pipeline:**
  - Support a hybrid approach: true GPU shaders (if feasible within the Python/imgui-bundle constraints) alongside extensions to the existing ImDrawList "faux-shader" batching system.
  - Implement rendering for a variety of shader effects, including:
    - CRT / Retro effects (scanlines, curvature, chromatic aberration for the NERV theme).
    - Post-Processing (bloom, blur, color grading, vignetting).
    - Dynamic Backgrounds (animated noise, gradients, particles).
- **Custom Window Frame:**
  - Overload or replace the default OS window frame to match the active UI theme.
  - Utilize the most convenient approach for the Python ecosystem (e.g., borderless window mode with an ImGui-drawn custom title bar, or accessible native hooks).
  - Ensure standard window controls (minimize, maximize, close, drag to move) remain fully functional.
- **Configuration & Tooling:**
  - **Theme TOML:** Allow users to define shader parameters and window frame styles within existing `config.toml` or theme configuration files.
  - **Live UI Editor:** Provide an in-app GUI panel to tweak shader uniforms and window settings in real-time.

## Non-Functional Requirements
- **Performance:** Shader implementations must not severely degrade GUI performance or responsiveness. Target 60 FPS for standard operations.
- **Maintainability:** Ensure the shader pipeline integrates cleanly with the existing event-driven metrics and theme architecture (`src/theme_*.py`, `src/gui_2.py`).

## Acceptance Criteria
- [ ] A dynamic background shader can be successfully loaded and displayed behind the main ImGui workspace.
- [ ] A post-processing shader (e.g., CRT scanlines or bloom) can be applied over the ImGui render output.
- [ ] The default OS window frame is successfully replaced or styled to match the selected theme, with working title bar controls.
- [ ] Shader and window settings can be configured via a TOML file.
- [ ] A "Live UI Editor" panel is available to adjust shader variables in real-time.

## Out of Scope
- Building a full node-based shader graph editor from scratch.
- Cross-platform native window hook wrappers (if not conveniently supported by existing Python libraries, we will fallback to pure ImGui borderless implementation).
