From 25e7c482fb5ad396fa3dccee131e7e075a7c7aed Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 9 May 2026 02:06:31 +0100 Subject: [PATCH] Preserve debug UI lessons --- state/evidence.jsonl | 3 +++ state/memory.json | 3 +++ state/scratch.md | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 023e0bd..0709f2d 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -42,3 +42,6 @@ {"area":"renderer/hdr","lesson":"Aquarium now has the first HDR presentation pipe before volumetrics: fixed manual exposure, half/quarter/eighth pre-tonemap bloom targets, firefly-safe downsampling, separable horizontal/vertical blur per level, low-gain bloom/veil composite before the ACES fit, and debug modes for bloom contribution and exposed luminance. This replaces the tempting full-res gather prototype with a proper hierarchical shape.","files":["src/Aquarium.Engine/Render/D3D11Renderer.cs","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","src/Aquarium.Engine.Contracts/Input/InputState.cs","src/Aquarium.Engine/AquariumHost.cs","src/Aquarium.Engine/Platform/Win32Window.cs","src/Aquarium.Engine/Render/DirectWriteOverlay.cs","docs/hlsl-renderer.md","docs/tsr-inspired-taa-spec.md","research/rendering/hdr-pbr-presentation.md","state/map.yaml","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-09"} {"area":"renderer/debug-ui","lesson":"Aquarium debug UI now uses a native Direct2D/DirectWrite retained panel inspired by CultLib code-first composition: controls are bound by explicit read/write delegates and styled as flat compact rows rather than importing Unity prefabs or ImGui chrome. The first panel toggles with F2 and drives render debug mode plus HDR exposure, bloom intensity, and bloom veil through shader constants.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","src/Aquarium.Engine/Render/DirectWriteOverlay.cs","src/Aquarium.Engine/Render/D3D11Renderer.cs","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","src/Aquarium.Engine.Contracts/Input/InputState.cs","src/Aquarium.Engine/Platform/Win32Window.cs","docs/hlsl-renderer.md","state/map.yaml","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-09"} {"area":"runtime/cultcache","lesson":"A startup EndOfStreamException from CultCache means the backing MessagePack snapshot itself is truncated, not that schema guardrails failed. Aquarium now quarantines unreadable snapshots beside the live cache and boots fresh typed state; CultLib single-file stores now write via same-directory temp file plus atomic replace so process death cannot leave a zero-byte live cache.","files":["src/Aquarium.Engine.Live/State/AquariumCultStateStore.cs","docs/cult-runtime-surface.md","state/memory.json","state/scratch.md","E:\\Projects\\CultLib\\src\\GameCult.Caching\\CultCache.cs"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4","zero-byte artifacts/dev-reload/cultcache/aquarium-client.msgpack quarantined and fresh 1773-byte cache created"],"ts":"2026-05-09"} +{"area":"renderer/debug-ui","lesson":"Direct2D/Vortice Rect construction takes x, y, width, height. Aquarium UI code should use explicit RectFromEdges helpers whenever layout is expressed as left/top/right/bottom, otherwise sliders and fills can explode into full-frame slabs.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","src/Aquarium.Engine/Render/DirectWriteOverlay.cs","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-09"} +{"area":"renderer/debug-ui","lesson":"Debug UI interaction feedback should be element-specific and stable-geometry: base/hover/active states, slider track/fill and handle brighten independently, active brightens further, and saturated accent colors should lerp toward white rather than resizing controls or darkening surfaces.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","src/Aquarium.Engine/Render/DirectWriteOverlay.cs","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-09"} +{"area":"renderer/debug-ui","lesson":"Tooltips now belong to code-first control declarations as optional intent strings and render as viewport-clamped Direct2D overlay slabs. Keep that path for future renderer controls instead of adding separate anonymous tooltip plumbing.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","src/Aquarium.Engine/Render/D3D11Renderer.cs","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-09"} diff --git a/state/memory.json b/state/memory.json index c650447..e14d242 100644 --- a/state/memory.json +++ b/state/memory.json @@ -73,6 +73,9 @@ "text_and_ui": [ "Overlay text uses DirectWrite/Direct2D after scene rendering. It is crisp final-pixel UI for debug surfaces, terminals, inspectors, and splash/status text.", "Aquarium debug controls should follow the CultLib code-first binding style without importing Unity prefab assumptions: panels, sections, sliders, toggles, and buttons bound by explicit read/write delegates, drawn as flat Direct2D/DirectWrite overlay UI.", + "Vortice.Mathematics.Rect uses x, y, width, height, not left, top, right, bottom. UI code should use explicit RectFromEdges helpers when reasoning in edges, or it will paint giant accidental slabs across the swapchain.", + "Debug UI feedback needs honest element-specific states. Use base, hover, and active visual states; sliders should respond on their track/fill and handle separately, keep geometry stable, and brighten by lerping accent colors toward white rather than resizing the handle or darkening the track.", + "Tooltips belong in the code-first control declarations as optional intent strings. Render them as compact Direct2D overlay slabs clamped to the viewport, not as an afterthought bolted to anonymous widgets.", "Bundled fonts are Montserrat for thin small-cap display text and Ubuntu Sans for body/debug copy. Runtime must not depend on fonts installed in Windows.", "Scene/diegetic labels should use renderer-owned MSDF/SDF billboards when they live in world space. Overlay text should not be shoved into HDR just because it is convenient.", "Debug UI is allowed as an explicit escape hatch. Object-owned radial surfaces remain the target interaction grammar." diff --git a/state/scratch.md b/state/scratch.md index e15eaec..ed2f423 100644 --- a/state/scratch.md +++ b/state/scratch.md @@ -117,7 +117,12 @@ prototype integrated along the camera ray before surface composition. toggled with F2. It uses a CultLib-inspired code-first control API with retained bound sliders/toggles/buttons instead of Unity prefabs or ImGui chrome. First live controls are render debug mode, exposure, bloom intensity, - bloom veil, and panel visibility; the HDR controls feed shader constants. + and bloom veil; the HDR controls feed shader constants. Important UI lessons: + Vortice `Rect` is x/y/width/height, so use `RectFromEdges` for edge math; + rows/buttons/tooltips are flat Direct2D overlay UI; sliders need + element-specific base/hover/active states where track/fill and handle brighten + independently without geometry changes. To brighten saturated orange, lerp + toward white instead of trying to increase HSV value. - Dev watcher correction: live runtime reload now waits for the host stdout log to acknowledge the exact new live DLL path before declaring success. A pointer write alone is not proof. `dev-watch.ps1 -ReopenWhenClosed` reopens the last