Repository navigation
trailview: a coarser far terrain on the phone (#3779) - #3791
Merged
Merged
Conversation
…3.7 and 0.15 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timohueser
marked this pull request as ready for review
November 21, 2026 21:04
…779-far-terrain # Conflicts: # builder/web/src/lib/trailview/budget.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mode: change #3779
Requirements: none
Public docs: no
Closes #3779. Part of #3656.
What changed
budget.ts: each tier has alodrow: the least and the most terrain range in node sizes, and the morph band in levels. Desktop: 4.6, 8, 0.3 (the oldRANGEandMORPH). Phone: 3.7, 3.7, 0.15.terrain/lod.ts:cdlodtakes the morph band, andRulecarries it.MORPHandRANGEare gone.terrain/terrain.ts:bestRange,qualityStepsand the rule take the limits of the tier. The surface uniform has a new last field,morph(432 bytes).drawn-height.wgsl,plan/cells.wgsl,roads/corridor.wgslreadsurface.morph.plan/pieces.tsreadsrule.morph.terrain/lod.test.ts: the selection test runs at the least and the most range of each tier, with the morph band of the tier (desktop 4.6 and 8, phone 3.7).PROBE_ABOVE_M: the bound is now at most D / (morph · above · ln 2). The eye's point morphs only above the start of the band of the finest level: 3.3 level-18 nodes on the phone, at least 166 m up to 71° N, where the bound is 0.06 D. At a walk's eye height the point is on the plateau of the finest level, so the answer does not move.DETAILinground/look.wgsl: the phone's 3.7 nodes keep the fade of the blades and the dots. Its largest frame, an iPad of 2752 pixels in portrait (3:4), gives about 0.22 m at a corner, so the 64° N ofrules.pystill holds.Checks
In
builder/web:npx vitest run src/lib/trailview: 69 files, 490 tests pass.npm run check: 0 errors, 0 warnings.npm run check:wgsl: pass.obc prose --check,cairn check: pass.The crack flight, M1 Pro, headless Chromium on Metal (
channel: 'chromium'throughOBC_BROWSER_WS), the box data (box-terrain.mbtiles, ground, box features),flight.mjs --gpu --cracks 10 --flights cracks.json:tier=phoneOver the small test fixture, both tiers show the same large red counts: the flight leaves the fixture's box. The box data is the right input for this flight.
Gallery (owner approval on #3779)
Headless Chromium on Metal, 390 × 844 CSS pixels at DPR 2 (780 × 1688), the T1 kit with two more scenes:
walk-planandvalley-drive-plan(ground=plan), for the near meshes of the new roads. Variants: the desktop tier, the desktop tier with only this cut, and the whole phone tier. Share of pixels that differ from the desktop by more than 8/255:The far views change in the middle distance: soft shading and a slightly coarser silhouette. The near meshes of the roads end at about 350 m in place of about 390 m (46.8° N); no start view shows it.
Finding outside this change
On the phone tier with a warm device cache,
waitForIdle()could return before the near road meshes draw, so thewalk-planshot showed the road under the eye flat grey. The cause is not the tier crossing: after a rest the meshes wait 120 calm frames (4 s at 30 fps), andTerrain.idledid not wait for them. Fixed in #3795. The gallery'swalk-planphone picture uses an empty cache, which this fault does not reach.Owner steps
tier=phonein one viewer window: the shorter morph shows only in motion.Review: one round, nothing blocking; three comment fixes (the iPad corner pixel, a past measurement in
budget.ts, a long line).Time spent measuring: about 20 minutes (crack flights 3, gallery 5, the cache fault 10, tests and checks 2).
🤖 Generated with Claude Code