feat: data-driven backgrounds + Balatro shader wallpaper#71
feat: data-driven backgrounds + Balatro shader wallpaper#71AndrewAltimit merged 10 commits intomainfrom
Conversation
Add a full data-driven background animation system that makes decorative background effects available to all skins via TOML configuration, replacing the previously hardcoded altimit-only vector overlay. Core infrastructure: - AnimClock: unified animation time source bridging frames and wall-clock - BackgroundLayer/BackgroundScene: composable layer system with 12 layer kinds (grid, dot_grid, wireframe_sphere, radar_sweep, concentric_rings, glass_shard, scanlines, eq_bars, crosshair, floating_polygons, pulsing_core, waves) with anchor positioning and animation params - Factory functions in backgrounds.rs for each layer kind - Waves layer: Vanta.js-inspired undulating surface with filled depth bands, perspective shading, and crest highlights - StrokeRoundedRect VectorOp for neon outline rendering - Entrance animations (fade_in, scale_up, slide_up) with per-icon stagger - Focus glow ring on selected dashboard icon - New icon presets: "geometric" and "hud" Theme integration: - [[background_layers]] TOML array-of-tables schema with per-layer kind, color, position, and animation config - [background_performance] section for complexity_budget / reduced_motion - ActiveTheme derivation from skin TOML and built-in presets - Render gate decoupled from icon_style across all 6 backends Per-skin profiles: - cyberpunk: dual-layer wave interference (cyan swells + magenta ripples) with scanlines - altimit: digital terrain waves + perspective grid floor - retro-cga: CRT scanlines + choppy signal waves + phosphor undertow + pulsing core - vaporwave, xp, macos, paper, solarized: subtle decorative layers - terminal, tactical, corrupted, modern, agent-terminal: built-in layers PSP guardrails: - Filters out expensive layers (FloatingPolygons, EqBars, Waves) - Max 4 layers, complexity budget capped at 100, reduced motion forced Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a new `oasis-shader` crate that implements Shadertoy-style fragment shader backgrounds. The first shader is the Balatro card game swirl effect (polar-coordinate twist + 5-iteration distortion + 3-color weighting). The software renderer evaluates the shader math per-pixel in Rust at 1/3 internal resolution with nearest-neighbor upscale for performance. Each backend blits the result as a wallpaper layer: - SDL3: uses backend's own load_texture/blit pipeline - WASM: putImageData on the main 2D canvas - UE5/FFI: software renderer → blit_rgba into shared buffer - PSP: shader layers filtered out (no programmable shaders) Theme integration via `[[background_layers]]` with `kind = "shader"`: ```toml [[background_layers]] kind = "shader" shader = "balatro" [background_layers.shader_params] color_1 = "#00F0FF" color_2 = "#FF2060" color_3 = "#0A0A14" speed = 1.0 contrast = 3.5 ``` Hides wallpaper and content_bg SDI objects when a shader layer is active so the shader renders as the true background behind all UI elements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Code ReviewIssues (if any)
Previous Issues (for incremental reviews)(none) Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Automated fix by Claude in response to Gemini/Codex review. Iteration: 1/5 Co-Authored-By: AI Review Agent <noreply@anthropic.com>
Review Response Agent (Iteration 1)Status: Changes committed, pushing... Commit: Fixed Issues
Ignored Issues
Deferred to Human
Notes
Automated summary of agent fixes. |
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)
Previous Issues (for incremental reviews)
Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Automated fix by Claude in response to Gemini/Codex review. Iteration: 2/5 Co-Authored-By: AI Review Agent <noreply@anthropic.com>
Review Response Agent (Iteration 2)Status: Changes committed, pushing... Commit: Fixed Issues
Ignored Issues
Deferred to Human
Notes
Automated summary of agent fixes. |
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)
Previous Issues (for incremental reviews)
Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Fix unresolved intra-doc links to BackgroundScene::build_ops and LayerKind that caused doc build to fail with -D warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)
Previous Issues
Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
- Guard floating_polygons and glass_shard against zero viewport dimensions (rem_euclid panics on i32 zero divisor, produces NaN for f32) - Accumulate delta time in UE5 FFI so Balatro shader animates instead of being frozen at t=0.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move rem_euclid wrapping from the caller (uniform drift wrap causing visual snap) to per-vertex in glass_shard(), so polygons wrap smoothly at viewport edges. Add zero-viewport guard to glass_shard(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Response Agent (Iteration 3)Status: No changes needed
Fixed Issues
Ignored Issues
Deferred to Human
Notes
The agent reviewed feedback but no file modifications were detected. |
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)
Previous Issues (for incremental reviews)
Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Automated fix by Claude in response to Gemini/Codex review. Iteration: 4/5 Co-Authored-By: AI Review Agent <noreply@anthropic.com>
Review Response Agent (Iteration 4)Status: Changes committed, pushing... Commit: Fixed Issues
Ignored Issues
Deferred to Human
Notes
Automated summary of agent fixes. |
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)(none) Previous Issues (for incremental reviews)
Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Automated fix by Claude in response to Gemini/Codex review. Iteration: 5/5 Co-Authored-By: AI Review Agent <noreply@anthropic.com>
Review Response Agent (Iteration 5)Status: Changes committed, pushing... Commit: Fixed Issues
Ignored Issues
Deferred to Human
Notes
Automated summary of agent fixes. |
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)(none) Previous Issues (for incremental reviews)
Suggestions (if any)(none) Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |
Automated fix by Claude in response to pipeline failures. Failures addressed: - format - lint - test-suite Actions taken: - Ran autoformat (ruff format, cargo fmt) - Fixed remaining lint issues Iteration: 1/5 Co-Authored-By: AI Pipeline Agent <noreply@anthropic.com>
Failure Handler Agent (Iteration 1)Status: Changes committed, pushing... Commit: Failures addressed:
Automated fix in response to CI pipeline failures. |
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues (if any)(none) Previous Issues (for incremental reviews)
Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3.1-pro-preview). Supplementary to human reviews. |

Summary
[[background_layers]]TOML config supporting waves, grids, scanlines, radar sweeps, glass shards, and more viaoasis-vectoroasis-shadercrate with CPU software renderer implementing the Balatro card game swirl effect (Shadertoy XXtBRr). Renders at 1/3 internal resolution with nearest-neighbor upscale for performanceTest plan
cargo build --workspace --releasecompiles cleancargo clippy --workspace -- -D warningspassescargo test --workspacepassesOASIS_SKIN=cyberpunk cargo run -p oasis-app --releaseshows animated Balatro shader background with icons/bars visible on top./scripts/build-wasm.shbuilds WASM; shader visible at localhost:8080 with cyberpunk skinGenerated with Claude Code