Repository navigation
Description
Scope now (the owner's targets of #3096, comment 6670626340)
This section replaces the older text below where they differ. Draft PR: #3161.
In this item:
- The heights of the records in the stamp: each near page takes
height_atper texel over the water and structure stamps; a page waits for its cell's records. - B's paint: the stamp writes the feature mask (core distance), B's paint texture (the paved labels and the rail beds) and the move texture;
road_atpaints from them onground=plan. - I1 as one probe run (
label-probe.mjs), not a CI test.
Dropped or deferred: the far layers and the tiers (distant roads past the masks), debug=exact and the 32/255 quality gate, the records-end fade, old-path byte-equal shots, the stand-in frame gate and the toggle tooling. The frame is one measurement of the whole road share against develop on the real viewer.
Deviations, changed in implementation:
- The records are the near level for every cell under the wanted near pages, in one texture of
RECORDS_MB= 32 MiB. The far level is not used. The town views of the fixture want about 2.4 km of cells and fit. - A separate records worker builds the records (the plan bridge's
records()). GP9 joins it with the plan worker, so a cell in the mesh range builds once. - The move texture holds the move only (8 MiB). The shaped zone ends where the heights moved the ground by more than
MOVED_M; there is no slope-layer share. height_atcomputes relative to a whole-metre base (GP6 review item 7).- No WALL flag on the new path; no free bits for GP10's step rule (see ground-plan GP8: the far look B, heights from the records in the stamp #3161).
- No mouths and no shoulder paint in B's paint yet.
- Corridors neither draw nor allocate pools on the new path.
Rewritten to the one road model (#3096); the previous body is in this issue's edit history.
Status: approved
Part of #3096. One pull request into ground-plan.
Depends on: #3135 (GP3R: the records, model_at, the far level with its height lists), #3113 (GP6: heights.wgsl), #3100 (GP5 phase B: the records of a cell from the plan worker).
Entry gate of GP9: the frame and quality gates of Verification hold before GP9 starts.
TL;DR
Goal: Behind the switch (ground=plan), every terrain page takes the heights and the masks of its ways from the records of its cells, once per texel when the page is made. The look paints the ways from those masks (variant B), with the same labels and the same heights as GP9's near mesh. The records' far range shrinks to a memory budget. Distant roads are a setting per tier. On the low tier first, the road share of a frame with GP9's stand-ins (develop's corridor share for the pieces, WAYS = false nearer than 560 m for the lean pipeline) is no larger than develop's whole road share, in interleaved runs scaled to one GPU clock. Without the switch every pixel stays as before.
Problem: The previous body builds a second road model in WGSL: its own segment records, its stroke rules, a TypeScript cross-section reader, and later FILLET records and class priorities (held decisions). The owner rejects two road systems and adopted one source (owner decisions). The prototype round measured the far look of the records (variant B, the look once per page): with fixed ground terms and the one-walk stamp it is a little faster than develop's whole road cost past 560 m, before GP9's pieces. A model stamp job still costs several develop jobs.
Decision:
- One record walk per texel in the stamp pass:
model_atgives the label, the core distance, the band distances, the paved label across the nearest edge and the slope layer's distance;height_atstarts at the bin's height lists thatmodel_atfound. - One feature mask for every reader (snap, plants, water, ground terms): the core distance, never the paint's distance. B's paint has a texture of its own in the mask's format. The move of the heights and the shaped share have a texture of their own.
- The ground terms are one function (
model_ground) for every look. The shaped zone ends at each line's own slope layer and fades over its outerSHAPED_FADE_M, with no class switch, or where the heights moved the ground (owner rule (c)). - Records on the device by distance: the near level near the eye, the far level beyond, in one GPU buffer of
RECORDS_MBper tier, nearest cells first, so a town shrinks the radius (owner). - Distant roads per tier (owner): the high tier keeps a far layer of B's paint for the drawn pages past the masks; the low tier does not.
- The snap moves terrain vertices onto the model's core outline (owner-approved snap). GP9 adds its fade past the floors.
- Today's water and structure stamps stay and bound the model until GP12 and GP14 make them records. The corridors do not draw on the new path.
Rejected:
- The previous far stamp (its own records, stroke rules and cross-section reader) and the held FILLET records and class priorities: a second road model.
- The page cache with an exact fallback, and with the far cache: about twice develop's whole share (
shapes/budget/). The paint of the cache is most of it. - The look per fragment everywhere (variant A): several ms per frame.
model_roadin the detail pipeline for distant roads: its presence alone costs about 1 ms on every detail fragment (shapes/bquality/section 2).- The paint's distance and code in the mask that the snap and the ground terms read: the snap creased the mesh on the wrong line, and the kind cut-off ran in texel stairs (
farb/item 1). - A shaped zone by class (10 m for a road, 3 m for a path, a select at a half-width of 1.2 m): a case distinction that gives a texel stair where a path leaves a road and speckles at a track's zone edge (
shapes/owner2/INDEX.md, "Still wrong"). - A shaped share from the core distance (core / (core − d_slope)): a bin lists only the edges near it, so the core distance is not exact far out, and the share jumps at bin lines (
shapes/owner2/reach/). - Two record walks per texel: the second walk is a fifth of a drive job (
shapes/bquality/section 3). - A baked records file: the fixture's records are about 50 MB against 296 kB of feature tiles.
Systems: trailview
Contracts: none (no tile, format or bake change)
Size: L (the stamp's model path, the look's B path and model_ground, the record store and its uploads, the far layers, the test toggle; about 1,000 to 1,400 changed lines)
Facts
Paths under builder/web/src/lib/trailview/ unless they start with host/, data/ or tests/. Evidence paths are on timosPC under /media/timo/OSM1/tmp/ground-plan/one-model/.
- Today: the stamp pass runs
stamp_atper texel of each new page, then the snap pass from the mask just written (terrain/terrain.ts:494-503,terrain/stamp.wgsl:103-140,:184-252). The mask isrgba8, levels 16 to 18: edge distance (asinh code, ±MASK_M= 12.75 m), sidewalk byte, across, and one byte with the surface code in its low 4 bits and the flags WALL, CONFLICT, FORDED, TAKEN in its high 4 bits (terrain/stamp.wgsl:127,terrain/features.wgsl:18-29). - The snap moves a mesh vertex onto a road edge within
SNAP_TEXELS= 3 texels of its level inside, 3.75 outside (terrain/stamp.wgsl:59-62). - Develop's paint fades at the masks' LOD band (level 16 to 15), so develop shows no road past about 1,500 m.
- Prototype:
scratch/one-model-proto(53048a9: tiers,RECORDS_MB= 64 interrain/model.ts;terrain/model.wgsl,ground/roads.wgsl; 4b21851: the shaped zone at the slope layer),scratch/one-model-farb(fb68806: theWAYSoverride and the toggle; 76c2f36: one feature mask, B's paint texture,model_ground; 5fb2251: the one-walk stamp). Not for merge. - The prototype's stamp keeps the far stamp of the previous GP8 for water and structures, and bounds the model's heights by them: a water's core bounds them; off the paved area a bore's cover and a deck's underside do too, so a road runs on onto its deck (
terrain/stamp.wgslonscratch/one-model-proto). - Frame of B with fixed ground terms and the one-walk stamp (
farb/cost/INDEX.md, GTX 1660 SUPER, 2560 × 1600, low tier, B past 560 m, no pieces): walk and drive a little faster than develop's whole road cost; with distant roads (far layers) about equal on the drive. GP9's near pieces are not in these numbers. The GPU clock moved between runs; the scaled shares and the unscaled ones differ by about twice the run-to-run spread. - Develop's road share (
shapes/budget/): corridors about a quarter to a third of it, the mask paint most of the rest. The road terms' code costs every detail fragment: B with no paint against B is the most that a lean pipeline near the eye can save (about a third of B's share). - Stamp job (
shapes/bquality/section 3, drive, before the one walk): the heights take at least half of a job (the ablation makes the far stamp draw its own roads). The one walk saves about a fifth of a job (farb/cost/). - Quality of B against the per-fragment look (
farb/,farb/cost/, 22 views, > 32/255 per band): after the fix of the ground terms, under 0.02 % from 560 to 1,500 m; past 1,500 m the far layers bring the same level. The noise of two per-fragment shots is of the same order past 1,100 m. The crops show no stair, tooth, blob or shard; thin ways are a little paler, and B's paint has no mouths of a lesser way's material and no model shoulders yet. - Shaped zone (
shapes/owner2/INDEX.md, 4b21851):near = smoothstep(0, 1, share),share = clamp(−d_slope / 2.5 m, 0, 1), d_slope the distance to the slope layer's outer edge (the union of every line's slope reach, Line word 6), share 1 on the core. The stair and the speckles of the class switch are gone. The stamp writes the share next to the move: 16 MB for 128 pages. - Records (
shapes/far/): per km² at the fixture's mix, near compact 0.68 MB, far compact 0.445 MB, the far level without height lists. A disc of 2 km: 5.9–7.2 MB; 5 km: 35–37 MB; all town: about 26 MB at 2 km and 166 MB at 5 km. 64 MB holds about 2.3 km of town without the far height lists. Build per cell, one thread, WASM: graph 0.81 ms, near records 3.34 ms, far records 2.13 ms (median); fill after a jump, far records only, one worker: 2 km in 0.45 s, 5 km in 2.8 s, 5 km of town in 16 s. - The far level of the prototype has no band layers and no height lists (
records::records_far). GP3R adds the height lists (TrailView ground plan GP3R: the records of a cell (one source for near and far) #3135, request 3, in its scope). - The production layout is GP3R's (TrailView ground plan GP3R: the records of a cell (one source for near and far) #3135, PR ground-plan GP3R: the records of a cell (one source for near and far) #3137,
MAGIC0x4f425201), not the prototype's: head and candidate hold 11 words each, with no metres-per-unit word (a reader takes the scale at the point from the cell's zoom-16 row); a line holds 14 words, with nomarkedflag (a look rule, GP11); candidate items hold exact vertex runs, not clipped i16 edges;findreturns only the label. A point on an edge reads as moved by (ε, ε²) in frame axes, exact for points on a grid of 1/1024 unit. The prototype's GPUmodel_atand CPUfinddiffer on 226 of 33,750 probe points (farb/cost/gpu/labels-aa0.json). - Owner rules for the look (owner decisions and the morning pages): one asphalt colour; a junction face takes the material of its highest-class arm; dirt mouths; shoulder paint as develop's (dusty asphalt on paved shoulders, else gravel; dustier only where an edge line divides it from the carriageway); the shaped zone ends where the heights moved the ground; distant roads per tier; the far cache on by default on the high tier; a memory budget that shrinks the radius; the model about as fast as develop, ideally a little faster, with no per-system budget numbers.
Design
1. The stamp per texel
On the new path, for each texel of a new page whose cells hold records:
- The block: a texel reads the block of the cell that holds the texel centre. An apron texel of a page lies in the next cell and reads that cell's block.
- One walk:
model_at_lod(p, aa = 2 texels, lod = false), GP8's WGSL port offindon the production layout, gives the label, the core distance (the least of the paved distance and the band layers' outline distances), the band distances (the slope layer's d_slope among them), the paved label across the nearest change within 2 texels, andModelPoint.heights(the first word of the bin's height lists). Band layers are never "near" candidates, so the reach changes neither the label nor the core. - Height:
h = height_at(block, q, label, base, ModelPoint.heights)(GP6), wherebaseis the page's plain terrain after today's water and structure stamps. h stays inside their bounds (a water's core; off the paved area, a bore's cover and a deck's underside). - Feature mask (today's
rgba8format and readers): the core distance (asinh code), the walk byte, the metres across (the side's sign, magnitude core + half-width), the surface code (a way of the model alone counts as code 1), the flags (WALL from the no-room rule, TAKEN from water and buildings, FORDED). The snap, the plants, the water and the ground terms read only this mask. GP8 lists the mask's bits on the new path and reserves two of them for GP10's step rule (STEP_E,STEP_S); if no two bits are free, the PR says so, and GP10 takes another texture. - Move and share: |h − base| (0 to 0.5 m in 2 mm steps) and the shaped share of section 2, in an
rgba8unormtexture of half the mask's width (two texels of a row in one texel, each as move and share; WebGPU has norg8unormstorage), 16 MB for the 128 mask pages. A late mask takes its plain terrain from the bicubic that made its page (stored_base). - B's paint texture, in the mask's format: the paved distance (asinh code), the walk byte or a track's sleepers, the paved label's host metres across, the paved label's finish code (code 2 as 1; 0 for none). The paved label is the texel's own where it is a carriageway, else the label across the nearest change within 2 texels. 4 bytes per texel: 32 MB for the 128 mask pages.
- Snap words from the feature mask's core distance: the snap moves terrain vertices onto the model's core outline (paved area ∪ paved shoulder, shoulder, verge). Until GP9 it acts at every distance; GP9 makes it 0 within the floors' range.
The side test on the GPU. model_at must not decide the side of a point near an edge, or of the bin's reference point, in f32: find decides it exactly, with the (ε, ε²) tie rule. GP8's rule matches it: the texel centre snaps to the 1/1024-unit grid, each edge test is an exact integer orientation (a 64-bit product from two u32 words; WGSL has no i64), and a tie takes the (ε, ε²) rule of find. The winding at the bin's reference point comes from the candidate item, not from a test. GP8 writes this design into this issue before coding, with its cost per stamp job; I1 proves it.
Kept from today's stamp, unchanged: lakes, the sea and their edges (the shore ramp ends at SHORE_REACH_M = 15 m), river cores and banks, platform pads, areas and buildings (TAKEN), the ground under a deck past its abutments, the cover over a bore past its portals, galleries, fords. On the new path bins.ts bins these records and no record of a way that the records hold: the model shapes and paints every such way. A way kind that the records do not hold yet keeps today's record; the PR lists such kinds (none expected: roads, tracks, paths and rail lines are record lines). GP12 and GP14 replace the kept stamps with records.
2. The look past the mesh (B)
On the new path, road_at (ground/roads.wgsl) reads B's paint texture, the feature mask and the move-and-share texture, all filtered as metres or shares, so bilinear filtering gives no stair:
- Paint: develop's
road_surfaceon the model's fields: one asphalt colour, the finish of the paved label, lines from the host's across. Whether a line carries markings is a look rule, not a record word:marked(todayterrain/bins.ts:174) becomes one function of the line's words (class rank, finish code), which GP11 owns and both looks call. - Ground terms, one function
model_groundfor every look (the mesh's ground faces in GP11 call the same function):- wall: where the mask's WALL flag is set and the code is a road's or a track's;
- shaped ground:
shaped = max(near, moved), faded out beforeMASK_Mof the core distance.near = smoothstep(0, 1, share),share = clamp(−d_slope / SHAPED_FADE_M, 0, 1)withSHAPED_FADE_M= 2.5 m, and share = 1 on the core. So the zone ends at each line's own slope reach and fades over its outer 2.5 m: one continuous field, no line id, no class.moved = smoothstep(0.05 m, 0.15 m)of the move (MOVED_M= 0.1 m); - cuts: shaped where the half-width is at least
PATH_HALF_M(a case distinction that remains, below).
- Early exit: a fragment whose core distance less the walk passes w + 0.5 m reads no paint texel.
- Until GP9 B paints at every distance on the new path. GP9 stops it where pieces draw. For the entry gate, the test parameter
farfrom=560stops B's paint nearer than 560 m, as GP9's range does. - Mouths and shoulders: the owner asked for dirt mouths and develop's shoulder paint. GP8 writes the mouth's finish and the shoulder share into B's paint texture by the near look's rules (
model_paint,model_shouldered,model_lined_shoulderonscratch/one-model-proto), and the hand-over shots of GP10 compare them.
3. Records on the device
- The plan worker builds a cell's records by distance: the near level (band layers, height lists) within the near range, the far level (height lists, no band layers) beyond (GP3R's encoders). GP5 phase B carries them out of the worker per cell. The near block of a cell in the mesh range is the one that GP7 reads (one build).
terrain/model.tskeeps the blocks in one GPU storage buffer ofRECORDS_MB, a tier value (high: 64 MB, the prototype's value; low: 64 MB until GP9's phone measurement sets it), the cells nearest the eye first, and a cell index per page. A town shrinks the radius. The far height lists change the radius; GP8 measures it again with them.- A page waits for its records: a page is stamped when every cell that it covers within the records' radius has its block. Until then the coarser page draws, as GP9's edge case 7. The wait is part of GP9's
plan.ready. When a block arrives or leaves, the pages over its cell are stamped again, nearest first. So after the records settle, a page depends on its node, its tiles and the records' radius only, and two shots of a view are equal. - The end of the records: past the radius no way shapes or paints the ground. Proposed: B's paint and the ground terms fade over the last
RECORDS_FADE_M(400 m, about one cell) of the radius, by a uniform; the heights past the radius are the plain terrain. Question 2.
4. Distant roads per tier
- High tier (the default on the GTX and the M1 Pro): each drawn page past the masks (the 64 nearest, the old far cache's pool) gets a far layer in B's paint texture (+16 MB), written by a far job with
model_at's level of detail at a 2-texel reach. B's paint reads it where no mask page holds the point. The near paint then does not fade at the masks' LOD band. This is the far cache in B's form (owner: on by default on the high tier). - Low tier: no far layer; the paint fades at the masks' LOD band, as develop's.
- The switch is the tier's
farRoads(tier=lowin the address). - No
model_roadin the detail pipeline. The per-fragment look stays as a debug view (debug=exact) in a pipeline of its own, as the reference of the quality gate.
5. Memory
| Pool | Bytes | Tier |
|---|---|---|
| records | RECORDS_MB: 64 MB (radius shrinks) |
both (a tier value) |
| B's paint texture | 32 MB (128 mask pages) | both |
| far layers | 16 MB (64 pages) | high |
| move and share | 16 MB (128 mask pages) | both |
New on the high tier: 128 MB of GPU memory; on the low tier 112 MB (with 64 MB of records). The corridor pools (27 + 20 MiB) go at GP19. Question 3. GP9 measures the phone (GP9, Verification).
6. The viewer on the new path
Roadsgets no feature tiles: no corridor, rail, sleeper or corridor deck builds or draws, andheldis 0 (Roads.write()returns 0 without tiles). If GP5 already does it, keep GP5's code.structures/bridges.tsdraws every bridge (the decks are the one exception of the model until GP12). The water mesh, its ribbons and the culvert mouths stay.- Two shots of a view are byte-equal once the records settle (section 3).
7. Test tooling: the fair frame toggle
GP0's alternate-frame toggle, extended (prototype fb68806): flight.mjs --toggle ways draws, on odd frames, no corridors, no pieces and no casters of either, and the terrain with the override WAYS = false (an all-zero road: no paint, no wall, no shaped ground, no cuts). Those frames are the flight with no ways. The road share is the terrain median (on) − (off) of one run, plus the shadow passes' (on) − (off), plus the stamp per frame. --toggle none is the control.
- The clock rule (for GP8, GP9 and GP10): the GPU clock is not held (no root on the test machine). The runs of one comparison are interleaved in one session (develop, new, develop, new).
flight.mjsprints the median clock of each run and the share scaled to the session's median clock (the method ofscripts/clocks.pyin the evidence folderfarb/cost/). The spread is the difference of develop's two scaled runs. A gate compares scaled shares: new ≤ develop + the spread. --lean FARFROM: the stand-in for GP9's lean pipeline: terrain nodes nearer than FARFROM draw withWAYS = false.
Case distinctions that remain
cutsselects on the half-width ≥PATH_HALF_M: a path has a bench, no cut face.- The tier switch
farRoads: the far layers cost memory and frame time that the low tier does not have. - The kept water and structure stamps bound the model's heights until GP12 and GP14.
Invariants and how each is proven
| Invariant | How it holds | Proof |
|---|---|---|
| I1. GPU label = CPU label, far = near | the same records and decide; the side test of section 1 matches find's exact rule; the far level keeps every paved candidate |
GP3R's agreement tests; GP8's probe: model_at in the stamp's path against find, fixture-wide and at points on and 1/1024 unit beside the edges: 0 differences |
I2. Page height = height_at |
the stamp calls it | GP6's native = GPU test through the stamp's path: ≤ 2 mm where no kept stamp bounds the point |
| I3. One walk = two walks | band layers are never near candidates; height_at from start reads the same lists |
a probe test: label, core and height of the one walk against model_at without reach and height_at with start = 0, bit-equal |
| I4. The same page each time | section 3 | two shots of every new-path view, byte-equal |
| I5. The snap moves vertices only onto the core outline | the snap reads only the feature mask's core distance | the PR's shots of main-road-15m and valley-eye (Pictures); GP9's strip count |
| I6. Pages agree at node borders | a texel reads the block of the cell that holds its centre (section 1) | the audit's apron check: heights within 1 mm at node borders |
| I7. The old path | no switch, no new branch | old-path shots byte-equal to the merge base's |
Interfaces with the other items
- GP3R (TrailView ground plan GP3R: the records of a cell (one source for near and far) #3135) gives the blocks (near and far, with the far height lists) and
find. GP8 portsfindto WGSL asmodel_atandmodel_at_lod, with a GPU = CPU test on the fixture (I1). - GP6 gives
heights.wgslwithstart, andModelPoint.heights. - GP5 phase B gives the records of each cell from the worker.
- GP9 takes the snap words, B past
R_eff, B at every distance where no piece draws (R = 0), theWAYSoverride, the toggle with its clock rule, and the phone measurement of the memory. - GP10 takes the feature mask with its two reserved bits, the move texture and the pages' heights for its readers.
- GP11 takes
model_groundand the paint rules, so the mesh paints by the same rules. - GP12 and GP14 replace the kept stamps with records. GP19 deletes today's stamp's road branches, the snap's old words and the corridors.
Edge cases
- A page whose records have not arrived: the coarser page draws; the page is stamped when the blocks arrive (section 3).
- A texel in an apron: it reads the next cell's block (section 1).
- Past the records' radius: plain terrain, with the fade of section 3.
- A water or structure stamp under a way: it bounds the way's height (section 1, step 3).
Plan
terrain/bins.ts: a plan branch that bins only the kept water, structure and building records.terrain/model.wgsl: the port offindon the production layout, with the side test of section 1 (its design on this issue first).terrain/stamp.wgsl: the model path of section 1 (the block per texel, one walk,height_at, the three textures, the snap words);terrain/heights.wgslfrom GP6.terrain/model.ts: the record store,RECORDS_MBper tier, the cell index per page, the uploads; page jobs that wait for records and stamp again on change.ground/roads.wgsl: B's paint,model_groundwith the slope-layer share, the early exit;terrain/features.wgsl: the paint texture, the move-and-share texture, the reserved bits.ground/look.wgsl: the overrideWAYS.tests/browser/trailview/flight.mjs:--toggle ways|roads|none,--lean, the clock and the scaled share.- The frame gate on the low tier (Verification). If it fails, the levers in this order: a cheaper heights path in the stamp (for example no heights for texels past every line's reach), then a report to the owner.
- The far layers and the tier switch, with their own number; the
debug=exactreference pipeline. - Shots, flights and tables of Verification.
Files
terrain/stamp.wgsl,terrain/bins.ts,terrain/terrain.ts,terrain/stamps.ts,terrain/stamp-worker.ts: change.terrain/model.ts,terrain/model.test.ts,terrain/model.wgsl: create.terrain/features.wgsl,ground/roads.wgsl,ground/look.wgsl: change.tests/browser/trailview/flight.mjs,shoot.mjs: change: the toggle, the clock, the share,farfrom,--lean.tests/browser/trailview/road-views-far.json: create (the 18 far views of bquality) andlow-views.json(its 4 low views).- No change:
terrain/stamp-core.wgsl(the kept stamps), the specs, the docs.
Verification
- Checks:
cd builder/web && npx vitest run src/lib/trailview:model.test.ts(nearest cells first within the budget; a block that arrives marks exactly the pages over its cell; the radius over town and country), the plan branch ofbins.ts(no record of a way that the records hold), the existing tests unchanged.npm run check,npm run check:wgsl.- Probe tests I1 to I3 (
flock /tmp/trailview-gpu.lock). - Old path byte-equal; new path twice byte-equal (
shoot.mjs --gpu, 1920 × 960). - The audit's apron check on the new path: heights within 1 mm at node borders, and the masks' codes equal except where the kept water code differs today.
- Entry gate: frame, low tier first.
flight.mjs --gpu --toggle ways, walk and valley-drive, 2560 × 1600, GTX 1660 SUPER, by the clock rule (section 7): develop, new, develop, new in one session. Runs: develop (the old path of the same build, which is pixel-equal to develop) and--toggle roadson develop for its corridor share; the new path withfarfrom=560,--lean 560andtier=low. Gate: on both flights, the new path's scaled road share plus develop's scaled corridor share is at most develop's scaled whole road share plus the spread. Reason: the owner's frame decision ("about as fast as develop, ideally a little faster; do not hold to the per-system numbers"); the corridors stand in for GP9's pieces and--leanfor GP9's lean pipeline, so the gate compares what GP9 will draw. GP9 gates the whole with the real pieces. - High tier, its own number: the same runs with the far layers. The PR reports the far layers' cost (high − low, scaled) per flight; the owner decides with it (distant roads are a setting per tier).
- Entry gate: quality (proposed tolerance, question 4): exact (
debug=exact) − B over the 22 views, per band, after the mouths and the shoulders are in B's paint (they change it). Proposed gate: > 32/255 at most 0.02 % of the terrain pixels in each band from 560 to 1,500 m. At ≥ 1,500 m on the high tier against exact with far roads: reported. The implementer looks at the worst crops of each band: no stair, tooth, blob or shard. - Measurements:
- Stamp per job and per frame by kind (heights and mask, mask only, far layers, stamps again after records arrive), median and p95; the shares of the heights, the walk and the rest; the GPU cost of the heights per stamp job and per frame (from GP6).
- Records: the radius in each view and along the flights, with the far height lists; the far level's bytes per km² with them; the four pools' largest use.
- Build: near and far records per cell, native and WASM; fill after a jump with near and far records.
- Pictures (one slider page, develop and the new path, 1920 × 960,
--gpu; the implementer looks at each):- the 18 far views and the 4 low views, high and low tier;
- from above:
junction0-top,j-tt-a-top,t-tertiary-top,x-tertiary-top,i07-hairpin-top,b45-bridge-junction-top,mouth-stream-top, also withdebug=mask; main-road-15mandvalley-eye(I5: the snap on the model's core outline, no wobble of edge lines);conn-road-into-path-eyeandd-hairpin-15mwith the terms view: the zone's edge one smooth curve, no stair, no speckles;- named steps past the mesh range: the Engelberg rail–road wall and one bridge end from 600 to 1,000 m. At 600 m a pixel is about 0.27 m and a texel 0.8 to 1.6 m, so a step can show as a stair of 3–6 px (question 5);
- band layers past the mesh range: a town street at 600 m (question 6);
- the end of the records: a view across the radius, high tier;
- the owner looks for: smooth road edges and lines at every distance, no flicker of paint between levels, no stair, tooth or blob in the shaped zone, the same junction shapes as the near views, roads that end softly where the records end.
Done when
- The entry gates hold (frame on the low tier, quality), or the owner decides on the measured numbers; the high tier's own number is in the PR.
- The checks pass; I1 to I7 are proven as stated.
- The PR has the tables, the slider page and the owner's answers to questions 1 to 3.
- The PR has merged into
ground-plan.
Out of scope
- Pieces, floors, the strip, the range, the snap's fade, B's stop where pieces draw, the lean pipeline itself, the phone: GP9.
- Readers and the hand-over at
R_eff: GP10. The mesh's looks: GP11. - Decks, portals, abutments: GP12. Water records: GP14.
- The records themselves: GP3R. Heights: GP6.
Questions for the owner
- GP8's held decisions (comment 6639067392): the snap past the floors stays, now onto the model's core outline; the FILLET records and the class priority go, because the records carry GP3's corners and priorities; the finer
acrosscode stays on the new path. Recommendation: release them so. - The end of the records' radius: B's paint and the ground terms fade over the last 400 m; the heights past the radius are the plain terrain. Recommendation: accept; the PR shows it at the radius.
- Memory: 128 MB of new GPU memory on the high tier, 112 MB on the low tier (section 5). Recommendation: accept for the GTX and the M1 Pro; GP9 measures the phone and sets the low tier's
RECORDS_MB. - The far look's tolerance (item 14 of the round): the proposed 0.02 % per band, measured after the mouths and shoulders. Recommendation: accept, or set the value from the PR's table.
- Named steps past the mesh range: after the wall and bridge-end shots, keep the texel stair or add one far rule for steps (for example the far heights ramp a step over one texel and the look paints the wall from the WALL flag). Recommendation: decide from the shots.
- Band layers past the mesh range (item 11 of the round): (a) the far level keeps each band layer while its width resolves, or (b) accept that they stop at the hand-over. Recommendation: decide from the town street at 600 m.
What changed from the previous body, and why
- The far stamp goes.
terrain/far-stamp.wgsl, its segment records and stroke rules,terrain/cross-section.tsand its vector, the steps audit, the held FILLET records and class priorities: a second road model, which the owner rejects. The stamp callsmodel_atandheight_atover the records. - New: one walk per texel, one feature mask, B's paint texture, the move-and-share texture,
model_groundwith the slope-layer zone, the record store with its budget per tier, pages that wait for their records, distant roads per tier, the fair toggle with the clock rule. - The snap (approved later in 6639067392) stays, onto the model's core outline.
- Kept: corridors off on the new path, today's water and structure stamps with the shore ramp at 15 m, the old path pixel-equal, the same shot each time.
- Gates: the previous per-job stamp gate (not above the old path) goes. The frame gate is the owner's whole-road rule with GP9's stand-ins, low tier first; the quality gate is new.
- Dependencies: GP3R, GP6 and GP5 phase B, not GP5 alone.
Generated by Claude Code
Activity
timohueser commentedon Nov 4, 2026
Start-here note for a fresh session (orchestrating session, 2026-11-04):
ground-plan. It brings theground=planswitch, the plan worker and the bridge. Nothing here waits for GP3.origin/ground-plan. One PR intoground-plan, then a fresh adversarial review.systemd-run --user --scope -p MemoryMax=3G -p MemorySwapMax=0 timeout 600 <cmd>;CARGO_BUILD_JOBSat most 6;flock /tmp/trailview-gpu.lock;/media/timo/OSM1/tmp/ground-plan/gp8/with an INDEX.md.timohueser commentedon Nov 4, 2026
Design check against the owner's rules (no special cases; thin parts are valid; GP3's strokes). The body now has these changes, each marked "changed after the owner's rules":
seg, the distance to the segment (a capsule), inside the segment's mitre quad and past a round line end. So every bend gets a round join on its outer side and every line end a round cap. Heights keep the mitre-quad parametert, so the quads of a line still meet on the mitre line with the same height, bank and distance (I3, I3b).c, a tie by sort), the separate rule for two path ends, the JOIN and END bits, the RECT zone at every flat end, and the mitre corner of I1 (6.6 m past a round band at a 90° vertex).seg ≤ max(h, 0.5 × texel), so round joins and ends too.YIELD_CELLS) goes: its reason was the snap, which the new path does not run.c + reach_mof a segment. The greatest reach from a centre line is 25.6 m, with no1 / cos(θ/2).FarStampcarries the winner's record and line. A span is checked where both ends have no core, or cores of one segment or of two consecutive segments of one line. So the medial step between two legs of one line's hairpin (I4) is not counted, and the continuity across each mitre line is.verge_m:Sectionhas none, andedgeisshoulder_m.The new section "Case distinctions that remain" lists every distinction with its reason. Comments go to GP6 (I1's footprint) and GP10 (the stream gate). GP9 does not change: I5 and I6 hold as written.
Generated by Claude Code
timohueser commentedon Nov 4, 2026
Two changes found in implementation. The body takes them with the next edit, marked "changed in implementation":
mitre()gives today. The tangent differs from the bisector where two chords differ in length. Then the distance to the line, and with it the edge and centre lines of the paint, jumps across the mitre line. The jump is about 0.2 m, seen from above at the junction ofvalley-eye. With the bisector, I3 holds exactly: on the inner side both chords measure the samelateralon the mitre line.Roads.write()returns 600 m without tiles, not 0. It returns itsbuilt, which isRANGE_M(600 m). So within 600 m the paint left the soil ways (gravel, dirt, grass, path) to corridors that never drew: the track and the meadow path ofmouth-stream-topwere missing on the plan's path. Fix:write()returns 0 when the road worker has no tiles. The old path always has tiles, so it does not change.Generated by Claude Code
timohueser commentedon Nov 4, 2026
GP8 handover
Head:
claude/gp8-far-stampat b6345e8. Pushed, nothing uncommitted.origin/ground-plan(d2a17de) is merged in. There is no PR.Done
Design: checked against the owner's rules. The body and its comments hold the changes:
Shader:
terrain/far-stamp.wgsl(far_stamp_at,stamp_of,FAR_STAMP,SHORE_REACH_M).stamp.wgslandaudit.wgslcallstamp_of, andaudit.wgslhas astepsentry.stamp-core.wgsl,corners.tsandapproaches.tsare unchanged.bins.tsplan branches:cross-section.ts;profileTable(true).Wiring:
plangoes through the stamp worker,stamps.ts, the audit samples, the water mesh and the structure node functions. Interrain.ts: the far stamp and far audit pipelines, no snap pass, no corridors, and the steps count in the audit result.Paint fix in
roads.ts:Roads.write()returns 0 without tiles.Vector and views:
host/obc-ground-plan/tests/cross-section.json(80 rows), asserted bytests/cross_section.rsandcross-section.test.ts.road-views-far.json(18 views).Checks that pass:
vitest src/lib/trailview: 401 tests;npm run check:wgsl;npm run check: one error only, the missingtest-support/flat-device/pkg, which this machine could not build (not GP8);cargo test -p obc-ground-plan --test cross_section;-p obc-ground-plan --all-targets -D warnings;cargo fmt --check.Binning (relative, CPU shared with SwiftShader): 588 nodes (every level-16 node of the fixture, and the level-17 and 18 nodes of the six junction places).
Not verified
stepscount, the apron and the conflicts.Open faults and what I know of their causes
Roads.write()returnedbuilt(600 m), soheldwas 600 m.road_atthen left every soil way (gravel, dirt, grass, path) to corridors that never drew. Fixed in a4d9a6e. Not seen again in a picture.valley-junction-top-plan-before-mitre-fix.png) shows 0.2 m jogs in the centre and edge lines at two mitre lines.mitre()gives the alignment's tangent, not the chords' bisector. Where two chords differ in length, the distance to the line jumps across the mitre line.Owner's verdict on the first pictures
main-road-15mmust go: rough, jagged slope strips left and right of the road.t-tertiarythe join on the left looks bad, and the sharp junction corners look worse than develop. The far stamp needs corner radii.tol(2 cm). Seen at eye height, 2 to 4 cm of noise from vertex to vertex shows as a zigzag on a receding line;tol0, or the core plane in place of the clamp) or a snap of the mesh, or both, is needed. Pictures on the GTX box decide which.Scratch tools on this machine
shoot.mjswithTIMEOUT_MS = SHOOT_TIMEOUT_MS ?? 120000, run with 3,000,000 ms. SwiftShader needs about 11 minutes per view at 1920 × 960, and the old path is as slow.cargo install wasm-pack --version 0.15.0 --lockedandcargo install wasm-bindgen-cli --version 0.2.125 --locked. The bridges were built withwasm-pack build … --no-opt, because the binaryen download is blocked. Neither tool is committed./home/user/gp-pictures/gp8/withINDEX.mdon this machine.Generated by Claude Code
timohueser commentedon Nov 4, 2026
Owner decisions on the GP8 design step (orchestrating session on timosPC)
The design probe is on
scratch/gp8-smooth-probe(e266592, not for merge). The proposal and the GPU pictures are in/media/timo/OSM1/tmp/ground-plan/gp8/(gpu-baseline/,diagnosis/,candidates/,corners/,design/PROPOSAL.md).Causes (measured on the GPU)
tolhas no measurable share.acrosscode, 8 bits over ±12.75 m, so 0.1 m steps. The mesh has no share.Decisions
h + shoulder).snap()takes the factorsmoothstep(floor_range, plan_range, distance): 0 where GP9's floors hold, 1 pastR_eff, and 1 everywhere whenR = 0. I6 becomes: "No vertex withinfloor_rangemoves. No strip vertex moves." A count proves the second sentence. The epic's section 8 changes the same way (proposal on EPIC — TrailView ground plan: one engine for ways and water near the eye #3096).corner_radius_mof the two arms; a point with two arms takes the lesserinner_radius_m. The values are GP3's, fromroads.json. A fillet acts only on its two arms' own segments, so it never joins hairpin legs.acrosscode (orchestrator's choice): the finer asinh scale applies only on the new path, behind the switch. The old path keeps its pixels and its byte-equal gate.Open for the implementation
r(≤ 9 m) past an arm's own footprint. GP6's owned region (I1) must cover this, or the cones stop at the arms' footprint. This needs a check.j-tt-a-far-1400andt-tertiary-far-1400put the eye outside the fixture, and need new eyes.Generated by Claude Code
timohueser commentedon Nov 5, 2026
DRAFT for review: a new body of GP8 for the one road model. This comment does not change the issue body. An independent reviewer reads it before the owner does.
Sources: the round's proposal (#3096 (comment)), its review (#3096 (comment)), the owner's decisions of 2026-11-05 (#3096 (comment)), GP8's held decisions (#3102 (comment)), and on timosPC
/media/timo/OSM1/tmp/ground-plan/one-model/:farb/INDEX.md(the far-B port note),shapes/budget/,shapes/bquality/,shapes/far/,shapes/farcache/,shapes/owner1/,shapes/owner2/,PROPOSAL-shapes.mdsections 6–10. Paths of evidence below are relative to that folder.TrailView ground plan GP8: the far look of the records: one record walk per texel, one feature mask, B's paint, distant roads per tier
Status: draft (one road model)
Part of #3096. One pull request into ground-plan.
Depends on: GP3R ("the records of a cell", the sub-issue that is being filed) (the records,
model_at, the far level), #3113 (GP6:heights.wgsl), #3100 (GP5 phase B: the records of a cell from the plan worker).Entry gate of GP9: the frame and quality gates of Verification hold before GP9 starts.
TL;DR
Goal: Behind the switch (
ground=plan), every terrain page takes the heights and the masks of its ways from the records of its cells, once per texel when the page is made. The look paints the ways from those masks (variant B), with the same labels and the same heights as GP9's near mesh. The records' far range shrinks to a memory budget. Distant roads are a setting per tier. The road share of a frame, with develop's corridor share as the stand-in for GP9's pieces, is no larger than develop's whole road share, measured with GP0's alternate-frame method against the flight with no ways. Without the switch every pixel stays as before.Problem: The approved body builds a second road model in WGSL: its own segment records, its stroke rules, a TypeScript cross-section reader, and later FILLET records and class priorities (held decisions). The owner rejects two road systems and adopted one source on 2026-11-05. The prototype round measured the far look of the records: variant B (the look once per page) costs 0.69 / 0.87 ms (walk / drive) past 560 m against develop's 0.96 / 1.07 ms for all of its roads. B's first form had stair borders, teeth and blobs in the ground terms, and its stamp job costs about 4× a develop job.
Decision:
model_atgives the label, the core distance, the band distances and the paved label across the nearest edge;height_atstarts at the bin's height lists thatmodel_atfound.model_ground) for every look; the shaped zone follows the owner's rule (c) and develop's distance.Rejected:
shapes/budget/). The paint of the cache is most of it.model_roadin the detail pipeline for distant roads: its presence alone costs +1.09 / +0.97 ms on every detail fragment (shapes/bquality/section 2).farb/item 1).Systems: trailview
Contracts: none (no tile, format or bake change)
Size: L (the stamp's model path, the look's B path and
model_ground, the record store and its uploads, the far layers, the test toggle; about 1,000 to 1,400 changed lines)Facts
Paths under
builder/web/src/lib/trailview/unless they start withhost/,data/ortests/.stamp_atper texel of each new page, then the snap pass from the mask just written (terrain/terrain.ts:494-503,terrain/stamp.wgsl:103-140,:184-252). The mask isrgba8, levels 16 to 18: edge distance (asinh code, ±MASK_M= 12.75 m), sidewalk byte, across, surface code and flags (terrain/stamp.wgsl:127,terrain/features.wgsl:25-29).scratch/one-model-proto(53048a9: tiers,RECORDS_MB= 64 interrain/model.ts;terrain/model.wgsl,ground/roads.wgsl),scratch/one-model-farb(fb68806: theWAYSoverride and the toggle; 76c2f36: one feature mask, B's paint texture,model_ground, far layers not verified;farb/scripts/one-walk.diff: one walk, not measured). Not for merge.terrain/stamp.wgslonscratch/one-model-proto).shapes/budget/, GTX 1660 SUPER, 2560 × 1600, mean of two runs, walk / drive, ms; in brackets scaled to 1920 MHz): develop's whole road share 0.96 / 1.07 (0.89 / 0.98), of which corridors 0.25 / 0.34, mask paint 0.69 / 0.64, stamp 0.02 / 0.08. B past 560 m, far roads off: 0.69 / 0.87 (0.63 / 0.85), of which the stamp 0.09 / 0.37. Two runs agree within 0.03 / 0.045 ms. The road terms' code costs every detail fragment: at most 0.33 / 0.26 ms of B (B with no paint against B).shapes/bquality/section 3, drive): heights 0.39 ms (51 %), first walk 0.15, second walk 0.16, the rest 0.07; 4.1× a develop job (0.19 ms). With the heights free, B's share is 0.69 / 0.69 ms.farb/, 22 views, > 32/255 per band): before item 1, 0.214 / 0.301 / 0.212 / 0.150 % at 560–800 / 800–1,100 / 1,100–1,500 / ≥ 1,500 m; after item 1, 0.014 / 0.015 / 0.004 / 0.159 %. The noise of two per-fragment shots: 0.004 % at 1,100–1,500 m, 0.034 % at ≥ 1,500 m. The rest at ≥ 1,500 m is streets that B drops past the masks with far roads off. The crops after item 1 show no stair, tooth, blob or shard; thin ways are a little paler, and B's paint has no mouths of a lesser way's material.shapes/far/): per km² at the fixture's mix, near compact 0.68 MB, far compact 0.445 MB. A disc of 2 km: 5.9–7.2 MB; 5 km: 35–37 MB; all town: about 26 MB at 2 km and 166 MB at 5 km. 64 MB holds about 2.3 km of town. Build per cell, one thread, WASM: graph 0.81 ms, near records 3.34 ms, far records 2.13 ms (median); fill after a jump, far records only, one worker: 2 km in 0.45 s, 5 km in 2.8 s, 5 km of town in 16 s.records::records_far). The fixture's file holds near blocks for every cell, so no shot met a far block's heights.shapes/owner1/,shapes/owner2/); distant roads per tier; the far cache on by default on the high tier; a memory budget that shrinks the radius.Design
1. The stamp per texel
On the new path, for each texel of a new page whose cells hold records:
model_at_lod(p, aa = 2 texels, lod = false)gives the label, the core distance (the least of the paved distance and the band layers' outline distances), the band distances, the paved label across the nearest change within 2 texels, andModelPoint.heights(the first word of the bin's height lists). Band layers are never "near" candidates, so the reach changes neither the label nor the core.h = height_at(block, q, label, base, ModelPoint.heights)(GP6), wherebaseis the page's plain terrain after today's water and structure stamps. h stays inside their bounds (a water's core; off the paved area, a bore's cover and a deck's underside).rgba8format and readers): the core distance (asinh code), the walk byte, the metres across (the side's sign, magnitude core + half-width), the surface code (a way of the model alone counts as code 1), the flags (WALL from the no-room rule, TAKEN from water and buildings, FORDED). The snap, the plants, the water and the ground terms read only this mask.rgba8unormtexture of a quarter of the mask's width (four texels of a row in one texel; WebGPU has nor8unormstorage), 8 MB for the 128 mask pages. A late mask takes its plain terrain from the bicubic that made its page (stored_base).Kept from today's stamp, unchanged: lakes, the sea and their edges (the shore ramp ends at
SHORE_REACH_M= 15 m, as approved), river cores and banks, platform pads, areas and buildings (TAKEN), the ground under a deck past its abutments, the cover over a bore past its portals, galleries, fords. On the new pathbins.tsbins these records and no record of a way that the records hold: the model shapes and paints every such way. A way kind that the records do not hold yet keeps today's record; the PR lists such kinds (none expected: roads, tracks, paths and rail lines are record lines). GP12 and GP14 replace the kept stamps with records.2. The look past the mesh (B)
On the new path,
road_at(ground/roads.wgsl) reads B's paint texture and the feature mask, both filtered as metres, so bilinear filtering gives no stair:road_surfaceon the model's fields: one asphalt colour, the finish of the paved label, lines from the host's across.model_groundfor every look (the mesh's ground faces in GP11 call the same rule):shaped = max(near, moved);near = 1 − smoothstep(0.75 · shaped_m, shaped_m, core distance),shaped_m10 m for a road and 3 m for a path;moved = smoothstep(0.05 m, 0.15 m)of the moved byte (MOVED_M= 0.1 m), faded out beforeMASK_Mof the core distance;PATH_HALF_M.farfrom=560stops B's paint nearer than 560 m, as GP9's range does.farb/"Unproven"). The owner asked for dirt mouths and develop's shoulder paint. GP8 writes the mouth's finish and the shoulder share into B's paint texture by the near look's rules (model_paint,model_shouldered,model_lined_shoulderonscratch/one-model-proto), and the hand-over shots of GP10 compare them.3. Records on the device
terrain/model.tskeeps the blocks in one GPU storage buffer ofRECORDS_MB= 64 MB, the cells nearest the eye first, and a cell index per page. A town shrinks the radius (about 2.3 km for all town).height_athas nothing to read there. Rule (a request to GP3R): the far level keeps the heights' lists of the lines it holds, so the heights are the same near and far. GP8 measures the bytes per km² with them.RECORDS_FADE_M(400 m, about one cell) of the radius, by a uniform; the heights past the radius are the plain terrain. Question 2.4. Distant roads per tier
model_at's level of detail at a 2-texel reach. B's paint reads it where no mask page holds the point. The near paint then does not fade at the masks' LOD band. This is the far cache in B's form (owner: on by default on the high tier).farRoads(tier=lowin the address).model_roadin the detail pipeline. The per-fragment look stays as a debug view (debug=exact) in a pipeline of its own, as the reference of the quality gate.5. Memory
New on the high tier: 120 MB of GPU memory; on the low tier 104 MB. The corridor pools (27 + 20 MiB) go at GP19. Question 3.
6. The viewer on the new path
Roadsgets no feature tiles: no corridor, rail, sleeper or corridor deck builds or draws, andheldis 0 (Roads.write()returns 0 without tiles). If GP5 already does it, keep GP5's code.structures/bridges.tsdraws every bridge (the decks are the one exception of the model until GP12). The water mesh, its ribbons and the culvert mouths stay.7. Test tooling: the fair frame toggle
GP0's alternate-frame toggle, extended (prototype fb68806):
flight.mjs --toggle waysdraws, on odd frames, no corridors, no pieces and no casters of either, and the terrain with the overrideWAYS = false(an all-zero road: no paint, no wall, no shaped ground, no cuts). Those frames are the flight with no ways. The road share is the terrain median (on) − (off) of one run, plus the shadow passes' (on) − (off), plus the stamp per frame. The script prints the clock per run.--toggle noneis the control.Invariants and how each is proven
decide; the far level keeps every paved candidatemodel_atin the stamp's path againstfind, fixture-wide (the prototype: 7,403 of 7,403)height_atheight_atfromstartreads the same listsmodel_atwithout reach andheight_atwithstart= 0, bit-equalInterfaces with the other items
model_atandmodel_at_lodin WGSL, and the far level's heights' lists (section 3).heights.wgslwithstart.R_eff, B at every distance where no piece draws (R = 0), theWAYSoverride and the toggle.model_groundand the paint rules, so the mesh paints by the same rules.Plan
terrain/bins.ts: a plan branch that bins only the kept water, structure and building records.terrain/stamp.wgsl: the model path of section 1 (one walk,height_at, the three textures, the snap words);terrain/model.wgslfrom GP3R,terrain/heights.wgslfrom GP6.terrain/model.ts: the record store,RECORDS_MB, the cell index per page, the uploads; page jobs that wait for records and stamp again on change.ground/roads.wgsl: B's paint,model_ground, the early exit;terrain/features.wgsl: the paint texture and the moved byte.debug=exactreference pipeline.ground/look.wgsl: the overrideWAYS.tests/browser/trailview/flight.mjs:--toggle ways|roads|none, the clock, the share.Files
terrain/stamp.wgsl,terrain/bins.ts,terrain/terrain.ts,terrain/stamps.ts,terrain/stamp-worker.ts: change.terrain/model.ts,terrain/model.test.ts: create.terrain/features.wgsl,ground/roads.wgsl,ground/look.wgsl: change.tests/browser/trailview/flight.mjs,shoot.mjs: change: the toggle, the share,farfrom.tests/browser/trailview/road-views-far.json: create (the 18 far views of bquality) andlow-views.json(its 4 low views).terrain/stamp-core.wgsl(the kept stamps), the specs, the docs.Verification
cd builder/web && npx vitest run src/lib/trailview:model.test.ts(nearest cells first within the budget; a block that arrives marks exactly the pages over its cell; the radius over town and country), the plan branch ofbins.ts(no record of a way that the records hold), the existing tests unchanged.npm run check,npm run check:wgsl.flock /tmp/trailview-gpu.lock).shoot.mjs --gpu, 1920 × 960).flight.mjs --gpu --toggle waysand--toggle roads, walk and valley-drive, 2560 × 1600, GTX 1660 SUPER, two runs each, one session, clocks reported. Runs: develop (the old path of the same build, which is pixel-equal to develop); the new path withfarfrom=560on the high tier and on the low tier. Gate: on both flights and both tiers, B's road share plus develop's corridor share of the same session (--toggle roadson develop) is at most develop's whole road share, within the run-to-run spread. Reason: the owner's frame decision ("about as fast as develop, ideally a little faster; do not hold to the per-system numbers"). GP9's pieces take the corridors' place, and GP9 gates the whole with them.debug=exact) − B over the 22 views, per band. Gate: > 32/255 at most 0.02 % of the terrain pixels in each band from 560 to 1,500 m (B after item 1: 0.014 / 0.015 / 0.004 %). At ≥ 1,500 m on the high tier against exact with far roads: reported. The implementer looks at the worst crops of each band: no stair, tooth, blob or shard.--gpu; the implementer looks at each):junction0-top,j-tt-a-top,t-tertiary-top,x-tertiary-top,i07-hairpin-top,b45-bridge-junction-top,mouth-stream-top, also withdebug=mask;main-road-15mandvalley-eye(the snap on the model's core outline: no wobble of edge lines);Done when
ground-plan.Out of scope
R_eff: GP10. The mesh's looks: GP11.Questions for the owner
acrosscode stays on the new path. Recommendation: release them so.What changed from the approved body, and why
terrain/far-stamp.wgsl, its segment records and stroke rules,terrain/cross-section.tsand its vector, the steps audit, the held FILLET records and class priorities: a second road model, which the owner rejects. The stamp callsmodel_atandheight_atover the records.model_ground, the record store with its budget, pages that wait for their records, distant roads per tier, the fair toggle.Generated by Claude Code
timohueser commentedon Nov 5, 2026
Requirement for GP8 from the GP3R review (#3137 comment 6655161502, M2), to add to the GPU
model_atdesign before coding: do not compute the side of a bin's reference point in f32.findcomputes it again for every edge; the doubled products reach about 2^40, so f32 fails on long edges near the reference point, which is the prototype's 101-point fault.past, the disc test andway_glob, or an exact port of them.Generated by Claude Code
timohueser commentedon Nov 5, 2026
Interface note from GP6 (draft PR #3140), for this sub-issue:
terrain/heights.wgsl:fn height_at(block: u32, q: vec2f, label: u32, t: f32, start: u32) -> vec2f(h, kind 0 terrain, 1 slope, 2 paved).startis the first word of the bin's height segment items; with 0 the function walks the bin.model_atcan give it asModelPoint.heights.terrain/records.wgslholds the block's layout and word reads (mw,mf,mi,M_*,m_cand,m_label,m_extras,m_bin_head,m_skip_item);model.wgslshould include it, not repeat it.terrain/model-words.wgslholds the bindingmodel_words(texture_2d<u32>,MODEL_ROW4096 words per row); a pass swaps that file for its own binding.H_SLOTSis 10.MAGIC0x4f425203): a line has 16 words.tests/browser/trailview/model-probe.mjschecks the WGSL against Rust fromdebug heights --gpu-check; it passes the label from Rust, so it does not testmodel_at.Generated by Claude Code
timohueser commentedon Nov 5, 2026
GP8 port status (draft PR #3161, branch
claude/gp8-far, merged withground-planat fb991e0):model_at(exact integer side tests),height_atper texel in the stamp, B's paint,model_ground. Behindground=plan./media/timo/OSM1/tmp/ground-plan/gp8/port/INDEX.md.The deviations are in the new first section of the body. For GP9 (#3103): join the records worker with the plan worker; the terrain grid near the eye tears at steps between ways. For GP10 (#3114): the feature mask has no two free bits for
STEP_E/STEP_S. For GP11 (#3104): B has no mouths, shoulder paint or retaining walls (no WALL flag on the new path).Generated by Claude Code
timohueser commentedon Nov 6, 2026
GP8 landed in
ground-planwith PR #3161. The adversarial review and its fixes are on the PR. Frame time equals develop; GPU memory is +25 MiB. The stamp pass (up to 4.4 ms, p95 2.0 ms per frame) is a GP9 budget item.Generated by Claude Code