Fensalir/state/map.yaml
2026-05-12 03:21:11 +01:00

103 lines
8 KiB
YAML

project:
name: Aquarium Engine
root: E:\Projects\Aquarium-Engine
upstream: https://github.com/GameCult/Aquarium-Engine
purpose: >
Native C# engine core for the Epiphany Aquarium client. The engine owns the
Win32 host, D3D12 renderer, input loop, client reload boundary, and future
render graph abstractions. The Epiphany client owns frontend intent and
configures those engine abstractions.
current_model:
host:
rider_solution: Aquarium.Engine.sln
cli_solution: Aquarium.Engine.slnx
window: src/Aquarium.Engine/Platform/Win32Window.cs
renderer: src/Aquarium.Engine/Render/D3D12Renderer.cs
grid_shader: src/Aquarium.Engine/Render/Shaders/D3D12Grid.hlsl
scene_shader: src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl
body_common_include: src/Aquarium.Engine/Render/Shaders/D3D12BodyCommon.hlsli
body_proxy_include: src/Aquarium.Engine/Render/Shaders/D3D12BodyProxy.hlsli
face_agent_shader: src/Aquarium.Engine/Render/Shaders/D3D12FaceAgent.hlsl
imagination_agent_shader: src/Aquarium.Engine/Render/Shaders/D3D12ImaginationAgent.hlsl
eyes_agent_shader: src/Aquarium.Engine/Render/Shaders/D3D12EyesAgent.hlsl
body_agent_shader: src/Aquarium.Engine/Render/Shaders/D3D12BodyAgent.hlsl
hands_agent_shader: src/Aquarium.Engine/Render/Shaders/D3D12HandsAgent.hlsl
soul_agent_shader: src/Aquarium.Engine/Render/Shaders/D3D12SoulAgent.hlsl
life_agent_shader: src/Aquarium.Engine/Render/Shaders/D3D12LifeAgent.hlsl
self_body_shader: src/Aquarium.Engine/Render/Shaders/D3D12SelfBody.hlsl
cursor_body_shader: src/Aquarium.Engine/Render/Shaders/D3D12CursorBody.hlsl
sdf_math_include: src/Aquarium.Engine/Render/Shaders/D3D12SdfMath.hlsli
agent_characters_include: src/Aquarium.Engine/Render/Shaders/D3D12AgentCharacters.hlsli
post_shader: src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl
overlay_text: src/Aquarium.Engine/Render/DirectWriteOverlay.cs
debug_ui: src/Aquarium.Engine/Render/Ui/DebugUi.cs
runtime_loader: src/Aquarium.Engine/Runtime/ClientRuntimeLoader.cs
dev_reload: scripts/dev-reload.ps1
dev_watch: scripts/dev-watch.ps1
epiphany_client:
contracts: src/Aquarium.Engine.Contracts
implementation: src/Aquarium.Epiphany
state_store: src/Aquarium.Epiphany/State/AquariumCultStateStore.cs
state_document: epiphany.aquarium.live_state
graphics_settings_document: epiphany.aquarium.graphics_settings
dependencies:
cult_math: E:\Projects\CultMath
cult_lib: E:\Projects\CultLib
docs:
doctrine: docs/aquarium-engine-doctrine.md
engine_client_boundary: docs/engine-client-boundary.md
epiphany_extraction_render_api_plan: docs/epiphany-extraction-render-api-plan.md
renderer: docs/hlsl-renderer.md
agent_sdf_visual_language: docs/epiphany-agent-sdf-visual-language.md
runtime_surface: docs/cult-runtime-surface.md
native_spine: docs/vortice-spine.md
tsr_inspired_taa_spec: docs/tsr-inspired-taa-spec.md
input: docs/input.md
hdr_pbr_presentation: research/rendering/hdr-pbr-presentation.md
invariants:
- The camera target is the Grid center on the global XY plane.
- Grid radius follows twice the clamped camera zoom distance, then clamps to [20, 80]; pitch/yaw/projection do not resize it.
- Body anchors remain world-space and independent of the moving Grid window.
- Visible scene lighting is diegetic; no default ambient/global fill.
- Overlay text is DirectWrite final-pixel UI; scene text needs renderer-owned billboards.
- CultCache persists live app state through reload.
- Global GraphicsSettings persists renderer debug/HDR presentation knobs through restart and live reload.
- Failed shader/live-runtime reloads must leave the last good frame alive.
- Closed visible dev windows can be reopened from the last good slot without rebuilding.
renderer_state:
current:
- D3D12 default renderer behind IAquariumRenderer with explicit device/queue/swapchain, command allocators, fences, descriptor arenas, upload ring constants, tracked render targets, command events, resize rebuild, HDR/bloom/present, temporal diagnostics, and DirectWrite overlay bridge.
- Deferred scalar Grid height target rendered from additive brush passes.
- Self Grid brush uses a widened 17-world-unit gravity bowl plus an Aetheria-style radial cosine wave; CPU, Grid shader, scene placement, and temporal reprojection share the same brush equation.
- Direct-traced Grid surface is a terminating perfect mirror over the scalar height field, sampling Studio2 PMREM mip 0.
- Fullscreen scene pass owns background and Grid only; each visible body owns a separate proxy pipeline and shader file, with shared proxy plumbing factored into HLSL includes. Body proxy marching evaluates only bodyDistance; bodySurface runs once at the refined hit and returns only PBR material values. Field identity is written by the proxy as temporal ownership metadata, not carried inside the surface packet.
- Reusable SDF primitives live in D3D12SdfMath.hlsli; current role character organs live in D3D12AgentCharacters.hlsli.
- Cursor is a luminous five-petal hibiscus SDF centered one cursor radius above the XY plane so its contact tip reaches Grid z=0 without projecting to the Grid surface.
- SDF/analytic bodies for Self, Face, Imagination, Eyes, Body, Hands, Soul, Life, and the cursor locator upload current centers, previous centers, and state scalars through `AgentVisualGpu`.
- Agent SDF visual language is documented against Epiphany's published CultNet surfaces: identity from agent memory, motion from heartbeat, posture from role/coordinator/result surfaces, pressure from reorient/pressure surfaces, and expression through bounded orbit wandering plus CPU-visible gravity-well pulses.
- Body light buffer feeds Self emission and direct body lighting; future other Selves should join this light lane, not a generic field-instance table.
- Studio2 PMREM and irradiance DDS cubemaps are loaded as D3D12 TextureCubes; PMREM serves roughness-mip specular, irradiance serves Lambertian diffuse IBL for non-metal bodies.
- DirectWrite/Direct2D debug UI panel with code-first controls bound to renderer state.
- Global GraphicsSettings document feeding render debug, exposure, bloom intensity, and bloom veil.
- Temporal resolve uses scene color, metadata, and control history only; dormant event history lanes are cut until a real producer and consumer contract exists.
- Bundled blue-noise texture assets are retained for future dithering/noise work even though the removed medium path no longer samples them.
- D3D11 scene renderer, runtime volumetrics, cloud/fog research, medium/froxel render targets, and the SDF-field renderer plan are shelved and removed from live repo state.
next:
- Extend explicit renderer debug modes for hits, normals, depth, bins, and lighting.
- Promote bodies and body lights from fixed renderer tables to CPU-owned registries with typed controls.
- Replace fixed fallback role motion with real CultNet-derived AgentVisualState.
- Build each agent role body from one coherent low-cost SDF form model before adding ornamental or state-reactive detail.
- Add diegetic labels and object-local menus after renderer and text contracts are stable.
- Follow docs/epiphany-extraction-render-api-plan.md to move Epiphany-specific render policy out of Aquarium.Engine and expose client-declared render targets, cameras, shaders, passes, resources, and features.
next_actions:
- Keep main as the live development branch.
- Add boundary checks that keep Aquarium.Engine free of Aquarium.Epiphany references and shrink role/client names out of engine source as the graph API lands.
- Verify publish output after every packaging-affecting change.
- Grow renderer debug controls through the Direct2D/DirectWrite overlay path.
- Follow research/rendering/hdr-pbr-presentation.md before changing HDR exposure, bloom, tonemapping, or display transforms.
- Follow docs/tsr-inspired-taa-spec.md when changing current temporal diagnostics.
- Promote future runtime knobs into typed CultCache documents before they become process folklore.