You are W-TREES7. Repo forge-assets (your worktree). The settlement page (browse/settlement.html, renderer
omg/kit/building/settlement-render.mjs + dress-render.mjs, copies in browse/building/) places real trees through the
engine's forest module, vendored at browse/vendor/fge-look/ (tree-forest.mjs, tree-cards.mjs, ez-tree.mjs: detail levels
near, baked picture cards far away; dress-render.mjs calls createForest with cardDistance 70, maxDistance 850).
Operator report (9 Oct 2026): "The trees glitch when I zoom in/out". In an aerial screenshot one tree also showed as a
near-black blob. Find out exactly what glitches and fix it.
1. Reproduce on the test GPU: aerial view of town/plain/2 and village/plain/3, move the camera in and out across the
   card distance and the LOD distances (several __cam calls at 20, 40, 60, 70, 80, 120, 250 m from a tree group) and
   take frames at each step; also a sequence of frames while zooming (camera moving between two shots) to catch popping,
   flicker, black or white cards, cards facing wrong, trees vanishing, shadow mismatch, or the progressive build
   re-running. LOOK at the frames. Write down what you see before changing code.
2. Fix the cause. Expected kinds of fix: a smooth cross-fade (dithered alpha / screen-door) between a tree and its card
   instead of a hard switch, hysteresis so a tree near the threshold does not flip every frame, cards baked with the
   same light and colour as the near tree (no darker/brighter swap), correct card orientation and size, cards lit by
   the town look's sun and fog (createTownLook in town-look.mjs: ACES tone mapping, FogExp2, a hemisphere light, a
   GTAO pass that may draw cards black if they do not write depth/normals right). If the bug is in the vendored module,
   fix it in the vendored copy AND write the exact patch in your report (the FGE engine copy lives at
   ~/forge-build/forge-game-engine/module/look/; do not edit that repo).
3. Cost: no worse frame time than today (page badge window.__fps / renderer.info.__main), town aerial + town walk.
Evidence: before/after frame strips (same camera steps) that you LOOK at, frame numbers, and a test if the fix has a
pure part (thresholds/hysteresis). Write W-TREES7-REPORT.md in plain words: what glitched, why, what changed, what is
NOT done.
Files you may change: dress-render.mjs (tree part only; another worker edits the grass part of the same file, keep your
edits inside the forest code to keep the merge easy), browse/vendor/fge-look/tree-*.mjs and ez-tree.mjs (gitignored:
also copy your changed vendor files to omg/kit/building/vendor-patches/ so they are committed), tests, the report.
Copy changed omg/kit/building/*.mjs to browse/building/. Do not touch render.mjs, roofs, grass, roads, heroes.
Tools: GPU probe on the test GPU box:
`FAL_PORT=8974 FAL_PROBE_FILE=<shots.json> tools/gpu/run.sh tools/gpu/shots_probe.py <out>` (shots.json = list of
{name, page:"settlement.html", js:[...], wait}; page hooks: window.__show(tier, site, seed, view, detail),
__cam(x,y,z,tx,ty,tz), __built() (its .dress / group holds the forest), __plan(), __fps, __look). browse/vendor is
gitignored: if missing in your worktree, COPY (not symlink, you will edit it) ~/forge-build/forge-assets/browse/vendor
into your worktree's browse/. Full tests: `node --test omg/kit/building/test/`.
Your worktree and ports are private; no coord claims; never deploy, never touch the server's live kit.
Commit after each working step. Time box: stop by 13:04 CET with what works committed and the report written.
