dev/render-all-scene-cache-and-camera-integration #16

Merged
bquarkz merged 21 commits from dev/render-all-scene-cache-and-camera-integration into master 2026-04-18 16:20:50 +00:00
3 changed files with 9 additions and 0 deletions
Showing only changes of commit 94c80e61ba - Show all commits

View File

@ -26,6 +26,7 @@ Introduce `FrameComposer` as a first-class hardware-side subsystem and move cano
- optional cache;
- optional resolver;
- owned `SpriteController`.
- Preserve scene-layer metadata naming aligned with the world path contract, including `parallax_factor` as the canonical per-layer camera multiplier field.
- Aggregate `FrameComposer` inside `Hardware`.
- Expose the minimum driver-facing surface required for subsequent plans.

View File

@ -16,6 +16,7 @@ Implement the `FrameComposer` scene-binding contract, minimal camera state, and
`DEC-0014` locks scene activation around `bind_scene(scene_bank_id)` with `SceneBankPoolAccess`, pointer-based access only, and `scene_bank_id + Arc<SceneBank>` retained inside `FrameComposer`.
The same decision also requires `FrameComposer` to remain tile-size agnostic and to preserve canonical per-layer `tile_size`, including `8x8`.
For the scene-layer motion contract, this plan treats `parallax_factor` as the canonical field name for the per-layer camera multiplier.
## Scope
@ -92,6 +93,7 @@ Align cache/resolver lifetime with the active scene contract.
- On unbind:
- discard cache/resolver and invalidate the world path.
- Any initialization must derive layer math from the bound scene tile sizes instead of assuming `16x16`.
- Any layer-camera math or related contract references must use `parallax_factor` terminology rather than generic `motion` naming.
**File(s):**
- `crates/console/prometeu-drivers/src/frame_composer.rs`
@ -104,6 +106,7 @@ Align cache/resolver lifetime with the active scene contract.
- scene status reflects no-scene and active-scene states.
- camera coordinates are stored as top-left pixel-space values.
- bind/unbind remains valid for scenes whose layers use `8x8` tiles.
- scene binding and camera-facing contracts preserve `parallax_factor` as the canonical layer field name.
### Integration Tests
- `FrameComposer` can resolve a scene from the pool and survive no-scene operation.
@ -119,6 +122,7 @@ Align cache/resolver lifetime with the active scene contract.
- [ ] Camera contract is implemented as `i32` top-left viewport coordinates.
- [ ] Cache/resolver lifetime follows scene bind/unbind.
- [ ] Scene bind/cache/resolver setup preserves canonical per-layer tile sizes, including `8x8`.
- [ ] Scene-layer camera multiplier naming is aligned on `parallax_factor`.
## Dependencies

View File

@ -16,6 +16,7 @@ Connect `FrameComposer` to `SceneViewportResolver`, apply cache refreshes inside
`DEC-0014` requires that cache refresh policy remain inside `FrameComposer` and that `FrameComposer.render_frame()` become the canonical frame entry while `Gfx` remains only the low-level execution backend.
`DEC-0014` also requires the world path to remain tile-size agnostic, with explicit support for `8x8`, `16x16`, and `32x32` scene-layer tile sizes.
For per-layer camera scaling, this plan treats `parallax_factor` as the canonical scene-layer field name.
## Scope
@ -43,6 +44,7 @@ Move cache-refresh orchestration fully into `FrameComposer`.
- apply them to `SceneViewportCache`
- Keep `Gfx` unaware of refresh semantics.
- Ensure resolver and refresh math follow the bound layer `tile_size` values rather than any fixed `16x16` default.
- Ensure per-layer camera math is expressed through `parallax_factor` naming in the resolver/cache path.
**File(s):**
- `crates/console/prometeu-drivers/src/frame_composer.rs`
@ -103,6 +105,7 @@ Protect the two canonical frame modes.
- `render_frame()` with a scene applies resolver refreshes before composition.
- cache refresh requests are applied by `FrameComposer`, not `Gfx`.
- `render_frame()` with an `8x8` scene uses resolver/cache math derived from layer tile size rather than a `16x16` assumption.
- Resolver/cache-facing tests use `parallax_factor` terminology for per-layer camera scaling.
### Integration Tests
- scene bind + camera set + sprite emission + `render_frame()` produces the expected composed frame.
@ -119,6 +122,7 @@ Protect the two canonical frame modes.
- [ ] No-scene `sprites + fades` behavior remains valid.
- [ ] `Gfx` remains backend-only for this path.
- [ ] The world path is explicitly covered for `8x8` scenes without `16x16`-specific assumptions.
- [ ] Resolver/cache/frame-path terminology is aligned on `parallax_factor` for scene-layer camera scaling.
## Dependencies