feat(client): size the Global rung to the viewport, not the region grid
Global took its cell counts from `global_cell_counts()` — one gridunit per region — and discarded the requested extent entirely. On GJ380c that produced a 191x95 canvas built from a heightmap stored at 512x256: roughly seven times the available cells thrown away before anything was drawn. The count also shrank as REGION_M grew, so tuning the scale ladder silently degraded the opener, which is why the top of the ladder got worse rather than better as the ladder itself was refined. Global now fits the largest 2:1 canvas inside the requested extent. It cannot take its ASPECT from the viewport — the canvas is equirectangular whole-body, 360 degrees of longitude by 180 of latitude, and must stay 2:1 or the cells stop being square and the map shears — so the existing letterbox absorbs the remainder. A hostile extent is still clamped; sizing to the request is not trusting the request. Global also joins the deep display ratio, making the band uniform. At 5 px per gridunit a 1920 px window asked for 384 cells across a body whose heightmap holds 512x256 — discarding stored detail to save work already done. At 2 px it asks for 960, which is heightmap-native: nothing thrown away, nothing invented, and the same screen area filled either way. A body with no radius is not a sphere (asteroid belt, oort cloud) and has no equirectangular surface to fit. Those degrade to the region grid — a visibly degenerate 1x1 canvas — rather than a plausible-looking lie at whatever size the viewport happened to ask for. project.yaml 0.4.3 -> 0.4.4 invalidates the persisted step-canvas disk cache. District/Quarter/Block/Chunk kept identical 960x540 cell counts through the extent inversion, so their cache keys are byte-identical while a District canvas now covers 3.6 km of ground instead of 1,966 km — a warm cache would silently serve pre-inversion canvases. Global still rides the orbital derive, so it carries no courses yet; that is the next step and is deliberately separate, being a cost question over the whole body rather than a sizing one. Pair session with Jeroen, 2026-07-26. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -85,15 +85,25 @@ const DISPLAY_RATIO_SHALLOW: float = 5.0
|
||||
## (D-255(a): "the deep, ground-level steps where the player is closest to
|
||||
## visible detail"). Chunk's own "1 screen px per 64 m gridunit, no
|
||||
## magnification margin" bottom-out rule (D-255(a)) is exactly DISPLAY_RATIO_DEEP.
|
||||
## D-255 amendment 2026-07-26: **Region moved to the deep ratio.** The shallow
|
||||
## fallback earned its keep only while a Region canvas was an orbital-scale
|
||||
## picture where extent, not per-cell fidelity, was what grew. Post-inversion
|
||||
## Region spans 262x466 km — a provincial map with real terrain in it — so it
|
||||
## takes the same crispness as every rung below it. Jeroen's brief for this
|
||||
## session in one line: "the global and region maps need to look the same as
|
||||
## the smaller level maps, but with obviously a different zoom level."
|
||||
## D-255 amendment 2026-07-26: **every rung now reads at the deep ratio**, so
|
||||
## this table is uniform and DISPLAY_RATIO_SHALLOW is currently unreferenced
|
||||
## (kept, not deleted — pending Jeroen's call, and it documents the retired
|
||||
## band). Jeroen's brief for this session in one line: "the global and region
|
||||
## maps need to look the same as the smaller level maps, but with obviously a
|
||||
## different zoom level."
|
||||
##
|
||||
## Region: the shallow fallback earned its keep only while a Region canvas was
|
||||
## an orbital-scale picture where extent, not per-cell fidelity, was what grew.
|
||||
## Post-inversion it spans 262x466 km — a provincial map with real terrain in
|
||||
## it — so it takes the same crispness as every rung below.
|
||||
##
|
||||
## Global: at 5 px/gridunit a 1920-px window asked for 384 cells across a body
|
||||
## whose heightmap is stored at 512x256 — discarding stored detail to save
|
||||
## work it had already done. At 2 px/gridunit it asks for 960, which is
|
||||
## heightmap-native: nothing thrown away, nothing invented. Both ratios fill
|
||||
## the same screen area; only the sampling differs.
|
||||
const DISPLAY_RATIO_BY_RUNG: Dictionary = {
|
||||
RUNG_GLOBAL: DISPLAY_RATIO_SHALLOW,
|
||||
RUNG_GLOBAL: DISPLAY_RATIO_DEEP,
|
||||
RUNG_REGION: DISPLAY_RATIO_DEEP,
|
||||
RUNG_DISTRICT: DISPLAY_RATIO_DEEP,
|
||||
RUNG_QUARTER: DISPLAY_RATIO_DEEP,
|
||||
|
||||
Reference in New Issue
Block a user