Give Aquarium Engine persistent state
This commit is contained in:
parent
ece974fb12
commit
f45f007cb8
10 changed files with 315 additions and 51 deletions
58
docs/aquarium-engine-doctrine.md
Normal file
58
docs/aquarium-engine-doctrine.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# Aquarium Engine Doctrine
|
||||
|
||||
Aquarium is a native engine now. The job is not to wrap a dashboard in a nicer
|
||||
skin; the job is to build a field machine that can host agents, state, sound,
|
||||
and UI as living objects.
|
||||
|
||||
## Frame Contract
|
||||
|
||||
- One camera target sits on the global XY plane.
|
||||
- That target is the Grid center.
|
||||
- Grid radius is derived from camera zoom distance.
|
||||
- Orbit changes yaw and pitch. Zoom changes distance. Pan moves the target.
|
||||
- Body anchors remain in world space.
|
||||
- The renderer may move the Grid visibility window, but world-space texture and
|
||||
field domains must stay stable.
|
||||
|
||||
## Renderer Contract
|
||||
|
||||
- The visible world is shader-owned.
|
||||
- Traditional geometry is scaffolding only when it helps the renderer stand up.
|
||||
- Raymarched bodies and Grid terrain must shade from the same field story that
|
||||
created their hits.
|
||||
- Broad-phase structures may cull, bin, and skip, but they must remain
|
||||
conservative. A culling primitive does not get to edit visible geometry.
|
||||
- Planet-local detail is local to the body domain. Moving a body must move its
|
||||
surface with it, not scroll the noise through the body.
|
||||
- Grid texturing and weather sample world-space domains.
|
||||
- HDR bloom spreads energy before tonemapping. ACES or its successor owns final
|
||||
display compression.
|
||||
|
||||
## Lighting Contract
|
||||
|
||||
- Self is the first diegetic emitter.
|
||||
- Surfaces should never be brighter than the light source unless the transport
|
||||
story explicitly explains it.
|
||||
- No ambient or global fill light in the default Aquarium path.
|
||||
- The long-term lighting target is a field sampled by terrain, bodies,
|
||||
atmospheres, particles, and diegetic UI.
|
||||
- Debug modes must expose hit coverage, normals, depth, field occupancy,
|
||||
lighting energy, and post-stack behavior before beauty work gets clever.
|
||||
|
||||
## UI Contract
|
||||
|
||||
- Debug overlay is allowed, but it is explicit chrome.
|
||||
- Overlay text uses DirectWrite and stays out of the HDR scene unless a feature
|
||||
intentionally projects it into the world.
|
||||
- Diegetic labels and menus should anchor to world objects and unfold locally.
|
||||
- Object-owned controls beat global panels.
|
||||
- Crisp text, focus, keyboard input, and accessibility are real requirements,
|
||||
not optional little manners.
|
||||
|
||||
## State Contract
|
||||
|
||||
- Runtime state is CultCache-backed and typed.
|
||||
- Live reload must rehydrate from cache before pretending it survived.
|
||||
- Shader reload may fail without killing the last good frame.
|
||||
- Live assembly reload may fail without killing the last good runtime.
|
||||
- Persistent state should be small, structured, and useful for future work.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# Branch Lineage
|
||||
|
||||
Epiphany Aquarium now has four lines of work:
|
||||
|
||||
- `EpiphanyAquarium-Web`: React, Tauri, WebGL2, DOM interaction grammar.
|
||||
- `EpiphanyAquarium-Bevy`: frozen Rust/Bevy prototype and renderer notes.
|
||||
- `AquariumSynth`: procedural audio crate extracted from the Rust prototype.
|
||||
- `Aquarium-Engine`: C# engine seed for the next line.
|
||||
|
||||
This repo is intentionally new history. It should not pretend the C# engine
|
||||
already existed inside the older commits. The older histories remain in their
|
||||
own repos where their evolution makes sense.
|
||||
|
|
@ -22,10 +22,10 @@ Terrain-hugging orbit cups should come back through a real object table or
|
|||
precomputed frame constants, not repeated procedural work inside every SDF
|
||||
sample. That was the tiny furnace. It has been told to sit down.
|
||||
|
||||
## Bevy Feature Port
|
||||
## Ported Renderer Lessons
|
||||
|
||||
The first Bevy feature port brings across the pieces that fit a single HLSL
|
||||
raymarch pass:
|
||||
The first native renderer pass carries the pieces that fit a single HLSL
|
||||
raymarch path:
|
||||
|
||||
- body-driven `powerPulse` Grid wells
|
||||
- world-space Grid weather with domain warping and filament layers
|
||||
|
|
@ -33,10 +33,9 @@ raymarch pass:
|
|||
- material-specific normals so terrain and body shading do not re-evaluate the
|
||||
entire scene six times per visible pixel
|
||||
|
||||
The Bevy SH/froxel lighting, brick maps, HDR bloom graph, and debug terminal are
|
||||
not directly ported yet. Those need engine systems around the shader rather than
|
||||
more one-pass pixel shader stuffing. The machete remains on the wall, tastefully
|
||||
lit.
|
||||
Volumetric lighting, brick maps, HDR bloom, and debug controls are not one-pass
|
||||
pixel-shader jobs. They need engine systems around the shader rather than more
|
||||
stuffing in `AquariumPS`.
|
||||
|
||||
## Deferred Grid Pass
|
||||
|
||||
|
|
|
|||
|
|
@ -19,14 +19,13 @@ want, while still keeping C# and Rider as the everyday working environment.
|
|||
|
||||
## Current Renderer
|
||||
|
||||
The renderer currently clears the swapchain backbuffer. That is intentionally
|
||||
small. The next layers should be added in this order:
|
||||
The renderer currently owns the first visible Aquarium frame:
|
||||
|
||||
1. Camera constants and world-to-clip math.
|
||||
2. One full-screen raymarch pass for solid SDF bodies.
|
||||
3. Grid-space heightfield surface.
|
||||
4. HDR render target, ACES tonemap, and gentle pre-tonemap bloom.
|
||||
5. Diegetic labels and debug UI as separate, explicit systems.
|
||||
1. Camera and Grid constants come from the live runtime.
|
||||
2. A Grid-space height pass renders the gravity/terrain height target.
|
||||
3. A fullscreen HLSL pass raymarches solid Grid terrain and body SDFs.
|
||||
4. A small primitive bin table skips irrelevant body checks per ray region.
|
||||
5. DirectWrite overlay text draws after the scene pass.
|
||||
|
||||
No framework-owned deferred path or ambient light is hiding under the floor.
|
||||
When lighting returns, it enters through Aquarium-owned fields.
|
||||
|
|
|
|||
Loading…
Reference in a new issue