Skip to content

Generate deterministic projection tiles and guard-band chunks #22

Description

@zoeyrose

Important

This preserved world-imagery design now belongs to the fresh MIT shared renderer. Authored geography, labels, and content decisions remain in atrinik/content; rendering/projection code is shared by client, editor, and offscreen products.

Replacement implementation contract

Implement deterministic chunk coverage, guard bands, overlap/crop, naming/manifests, seam validation, batching, caching, and atomic image products through the shared wgpu/offscreen renderer. Preserve all geography/disclosure/product decisions while removing extracted classic-client assumptions.

Use explicit versioned scene/resource/projection inputs, deterministic clocks/profiles, bounded concurrency and memory, atomic outputs, manifests/digests, semantic-mask validation, and renderer metrics. No source-tree/runtime discovery or separate imagery renderer is permitted.

Verified original past work by an approved MIT provenance grantor may be copied, migrated, translated, or relicensed only through the merged complete-provenance grant directive.

Lighting-profile chunk invariants

Render and validate fully-lit and intended-darkness as separate canonical outputs over one projection/tile matrix. The explicit authoritative light field/profile is part of every chunk dependency and cache key; a chunk from one mode can never satisfy the other merely because content coordinates match.

Compute light guard bands from the actual influence/interpolation bounds for each profile. Monolithic-versus-chunked equality and cross-map/cross-depth seam tests run independently in both modes, including indoor/outdoor boundaries and static colored/negative emitters spanning a crop edge. A paired batch may reuse immutable scene geometry/resources and parallel CPU preparation/encoding, but keeps mode-specific light targets/readbacks/cache state isolated and commits results in deterministic order.

Both modes use the normal shared rendering/light/material path defined by #14. fully-lit supplies maximum neutral authoritative samples; it is not a special bypass shader or postprocess. Report the incremental GPU/CPU/readback/cache/storage cost of the second mode, apply bounded backpressure, and fail the whole revision if either matched pyramid is incomplete or mismatched.

Preserved product/design specification and historical implementation notes

Parent and roadmap

Outcome

Compose complete regions from ordered scene snapshots using one isometric world projection and seam-free bounded chunks.

Scope

  • Traverse horizontal tiled topology and linked physical depths into stable world coordinates.
  • Compute conservative projected bounds from actual render commands/resources, including tall, doubled, rotated, stretched, multipart, and effect sprites.
  • Render chunks with required scene/light guard bands, crop after rendering, and preserve one cross-map/cross-depth painter order.
  • Emit raw RGBA and a versioned projection manifest mapping logical map/tile/depth coordinates to image anchors/polygons, labels, void coverage, hashes, and profile identities.

Superseded path / cleanup target

Do not composite complete maps/depths independently or keep scalar pixel_size metadata as a second coordinate model after consumers migrate.

Acceptance criteria

  • Chunked output matches monolithic fixtures without clipping, duplicates, lighting discontinuities, or painter seams.
  • Repeated runs with identical inputs/backend/profile produce identical manifests and hashes.
  • Projection metadata covers every map/depth/tile and remains bounded for large worlds.
  • Inconsistent topology or partial generation fails before publication.

Validation baseline

Before: world images place simplified per-map rectangles and cannot represent client isometric overlap or depth.

After: a deterministic projection/chunk pipeline produces raw client-rendered world imagery and exact coordinate metadata.

Run monolithic-versus-chunk comparisons, repeatability hashes, topology error fixtures, multi-depth/tall-sprite visual tests, and performance bounds.

This issue is a bounded child of #13. The parent remains open until every sibling child is complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions