fix: the five things integration found, and a cell that stands on the worst pose
The integration analysis built the actual combination of both tracks rather than adding up their reports, and found five defects plus one structural gap. All six are addressed here. **The detail normal map now follows its material into disposal.** `Material.dispose()` frees the material and not its maps — the same arithmetic `stage.ts` records for the renderer one level up — and `scene.ts`'s teardown traverses geometry and material only. Every board build was orphaning two 512-square RGBA textures on the GL context, about 2.8 MB with mips each, on a cache that retains three boards and rebuilds on every switch. `structures.ts` already had the idiom for its road canvases; copied rather than reinvented. **`TerrainOptions.detail` is `surfaceDetail`.** `createTerrain` reads `district.detail` nineteen lines below it — an unrelated flag meaning "metro lots, revealed by stand-off" — and the two are the gates for two different level-of-detail systems in one function, one of which decides whether the terrain is chunked at all. The test files had both spellings meaning both things. **The instrument stopped lying.** `store.tier` is an index and is always valid, because the coarse fill gives base districts an entry at every rung; at a pose with metro detail switched off the budget scan finds the visible base districts fit at the finest rung and sets it to 0. So `cost-at`'s new lot column printed "40 m" for a board drawing nothing but 806 m base lots — an instrument lying in the direction of "the fine rung is cheap", which is the direction that gets a budget spent that is not there. `detailTier` is `null` unless a detail district is actually drawn. **Two doc comments carried wrong numbers**, which is the defect this repo's house style exists to prevent. Capacity is exactly 19,000, not "about 26,000" — measured. And `LOT_BUDGET`'s guarantee is a bound on the *city*, not on the frame: the non-city cost is not a constant and nothing enforces it, reaching 288,365 at LA from 110 km. **And `california-one-basin`.** `california-one` is judged at the whole state from 1,551 km — the pose where the terrain grid saves nothing and the city is off. Every expensive pose this product has is somewhere else, and that was not hypothetical: six poses over the LA basin measured over the cap, one at 761,648, all reachable from the board's own chapters for as long as the merged board has existed. A cap nobody measures is not a cap. Eleven kilometres because the ladder makes the worst pose an interior one, not the closest: 12 / 11.5 / 11 / 10.5 / 10 / 7.7 km reads 340,328 / 390,598 / 390,578 / 390,578 / 387,428 / 375,172. A cell at 2.5 km or at 7.7 km would have watched the wrong thing. Its caps are `california-one`'s own rather than recorded from this run, because the question is not "has this pose regressed" but "is this board still inside the budget it claims".
This commit is contained in:
@@ -138,6 +138,55 @@ const SCENES = {
|
||||
document.querySelector("#chapters .chapter[data-view='california-overview']") !== null &&
|
||||
document.getElementById("sea-section") !== null,
|
||||
},
|
||||
/**
|
||||
* The merged board over the Los Angeles basin, from eleven kilometres.
|
||||
*
|
||||
* **This cell exists because that pose is the board's worst and nothing stood
|
||||
* on it.** `california-one` above is judged at `california-overview`, which is
|
||||
* the whole state from 1,551 km — the pose where the terrain grid saves
|
||||
* nothing and the city is switched off. Every expensive pose this product has
|
||||
* is somewhere else, and the consequence was not hypothetical: six poses over
|
||||
* the LA basin were measured over the 400,000 cap, one of them at 761,648, and
|
||||
* every one of them had been reachable from the board's own chapters for as
|
||||
* long as the merged board has existed. A cap nobody measures is not a cap.
|
||||
*
|
||||
* Eleven kilometres and not seven or two, because the ladder in `blocks.ts`
|
||||
* makes the worst pose an interior one rather than the closest one: swept at
|
||||
* 12 / 11.5 / 11 / 10.5 / 10 / 7.7 km the board reads 340,328 / 390,598 /
|
||||
* 390,578 / 390,578 / 387,428 / 375,172. The peak sits where the rung has just
|
||||
* gone fine enough to cost but the basin is still wholly in frame. Closer is
|
||||
* cheaper, further is cheaper, and a cell at either would have watched the
|
||||
* wrong thing.
|
||||
*
|
||||
* The pose is planted through `__teraCamera.seek`, which takes true metres, so
|
||||
* this reads the same whatever a board's scale is. That is a deliberate
|
||||
* departure from every other cell here — they aim by clicking a chapter, which
|
||||
* is the control a reader also uses — and the reason is that no chapter points
|
||||
* here. The alternative was to author one, which would put a rung on the
|
||||
* ladder for a pose whose only purpose is to be expensive.
|
||||
*/
|
||||
"california-one-basin": {
|
||||
host: "tera.lumbridgecorp.com",
|
||||
query: "?city=california&one=1&handover=0",
|
||||
signature: "california-overview",
|
||||
ready: () =>
|
||||
document.getElementById("boot")?.hidden === true &&
|
||||
document.querySelector("#chapters .chapter[data-view='california-overview']") !== null,
|
||||
activate: () => {
|
||||
const camera = globalThis.__teraCamera;
|
||||
if (camera === undefined || typeof camera.seek !== "function") {
|
||||
throw new Error("no __teraCamera hook on this build — the basin cell cannot aim");
|
||||
}
|
||||
if (camera.board !== "california") {
|
||||
throw new Error(`the basin cell landed on "${camera.board}", not the merged board`);
|
||||
}
|
||||
camera.seek({ lat: 34.05, lng: -118.24, standoffM: 11_000 });
|
||||
},
|
||||
// The lot ladder settling is what this cell measures, so it must not sample
|
||||
// until it has: `updateBlocksDetail` runs off the frame loop and a frame
|
||||
// taken on arrival is a frame of the pose the camera left.
|
||||
active: () => (globalThis.__teraCamera?.lots?.()?.packed ?? 0) > 0,
|
||||
},
|
||||
socal: {
|
||||
host: "tera.lumbridgecorp.com",
|
||||
query: "?city=socal&handover=0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"note": "Caps are never raised. A red p95FrameIntervalMs on this box is noise before it is a finding \u2014 the GPU here never leaves 500 MHz of a possible 2,725, so a desktop cell on the vsync deadline flips between 16.8 and 33.3 ms with geometry identical to the digit; judge on maxTriangles and maxDrawCalls. The five scene names are bound to board identity in performance-budget.mjs: every scene asserts the data-board of the pressed tab, because ?city= falls back to the first board rather than failing and a bay-area cell that silently measured California would pass its cap by a factor of six. `california-one` is the merged board and its caps are RECORDED, not copied: measured 352,927 triangles / 420 draws desktop and 352,527 / 416 mobile on its first full run, set here with headroom in the same spirit as bay-area and socal. They were briefly copied from `california`, which is wrong for the reason that cell's own numbers are wrong for this board \u2014 `california` describes a state with no cities on it, and this one carries 56,327 buildings, two ports and both metros' bridges and airports. No existing cap was raised to accommodate it. Since the frustum-cull work, geometry submitted is a function of the camera: the terrain is a grid of 17 chunk meshes plus one un-chunked caster and the city is packed by district against the view frustum, so `maxDrawCalls` and `maxTriangles` are maxima over the sample window and the terrain half of the draw count is bounded at +17 by the object count rather than by a measurement. The change is directional \u2014 it can only remove geometry that was drawn before \u2014 so performance-budget.mjs's assumption that geometry is not a function of the camera path still holds in the only form it was ever relied on. No cap moved for it either.",
|
||||
"note": "Caps are never raised. A red p95FrameIntervalMs on this box is noise before it is a finding \u2014 the GPU here never leaves 500 MHz of a possible 2,725, so a desktop cell on the vsync deadline flips between 16.8 and 33.3 ms with geometry identical to the digit; judge on maxTriangles and maxDrawCalls. The five scene names are bound to board identity in performance-budget.mjs: every scene asserts the data-board of the pressed tab, because ?city= falls back to the first board rather than failing and a bay-area cell that silently measured California would pass its cap by a factor of six. `california-one` is the merged board and its caps are RECORDED, not copied: measured 352,927 triangles / 420 draws desktop and 352,527 / 416 mobile on its first full run, set here with headroom in the same spirit as bay-area and socal. They were briefly copied from `california`, which is wrong for the reason that cell's own numbers are wrong for this board \u2014 `california` describes a state with no cities on it, and this one carries 56,327 buildings, two ports and both metros' bridges and airports. No existing cap was raised to accommodate it. Since the frustum-cull work, geometry submitted is a function of the camera: the terrain is a grid of 17 chunk meshes plus one un-chunked caster and the city is packed by district against the view frustum, so `maxDrawCalls` and `maxTriangles` are maxima over the sample window and the terrain half of the draw count is bounded at +17 by the object count rather than by a measurement. The change is directional \u2014 it can only remove geometry that was drawn before \u2014 so performance-budget.mjs's assumption that geometry is not a function of the camera path still holds in the only form it was ever relied on. No cap moved for it either. `california-one-basin` is the merged board over the Los Angeles basin from eleven kilometres, and it exists because that pose is the board's worst and nothing stood on it: six poses over that basin were measured over the 400,000 cap, one at 761,648, all reachable from the board's own chapters. Its caps are NOT recorded from a first run in the way bay-area and socal were \u2014 they are `california-one`'s own 400,000/460/455, deliberately, because the question this cell asks is not 'has this pose regressed' but 'is this board still inside the budget it claims'. Measured at 390,598 triangles on the run that added it, a 2.3% margin held by one constant (`LOT_BUDGET`), which is the tightest thing in this file and the reason it is now watched.",
|
||||
"scenes": {
|
||||
"california": {
|
||||
"desktop": {
|
||||
@@ -73,6 +73,18 @@
|
||||
"maxDrawCalls": 455,
|
||||
"maxTriangles": 400000
|
||||
}
|
||||
},
|
||||
"california-one-basin": {
|
||||
"desktop": {
|
||||
"p95FrameIntervalMs": 16.7,
|
||||
"maxDrawCalls": 460,
|
||||
"maxTriangles": 400000
|
||||
},
|
||||
"mobile": {
|
||||
"p95FrameIntervalMs": 33.3,
|
||||
"maxDrawCalls": 455,
|
||||
"maxTriangles": 400000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user