Follow-up to #18, which is resolved: multisample's offsets are in the calling noise program's grid units, so vulcanus_basalt_lakes_multisample's min-filter spans 4 tiles for cliffs and 1 for per-tile consumers (PR #83, test/multisampleGrid.spec.ts).
That took the Vulcanus cliff port from recall 0.806/0.938/0.853 with 12.5% wrong orientations to recall 1.000/0.973/0.965 with 2.4%. This issue tracks what is left.
1. The residual itself
37 of 1531 matched cells still carry a wrong orientation, and precision is 0.872 (1756 placed vs 1569 real) without the lava-collision rejection, which the shipping renderer applies and this measurement does not. Per region:
| region |
game |
ours |
matched |
wrong |
recall |
[0,0] |
283 |
292 |
283 |
7 = 2.5% |
1.000 |
[1500,1500] |
885 |
1070 |
861 |
26 = 3.0% |
0.973 |
[-1200,800] |
401 |
394 |
387 |
4 = 1.0% |
0.965 |
Almost all the surviving over-placement is [1500,1500] (~209 cells; [0,0] is down to 9). First step is to re-measure with the lava rejection applied, which is how the renderer actually runs - it may account for much of the 187-cell excess.
2. A small regime split survives, with the same shape as the bug just fixed
test/vulcanusElevationLevels.spec.ts sweeps cliff_elevation_0 and inverts the generator's own elevation. Before the fix the over-placement ratio was 1.20-1.49 below elevation 120 and 1.00-1.04 above - a clean edge at exactly where 120 * vulcanus_basalt_lakes_multisample saturates. After the fix it is 1.000-1.085 everywhere, but the split has not gone to zero:
- worst ratio below 120: 1.085
- worst ratio above 120: 1.018
- gap 0.067, down from 0.16 but still positive, and the spec asserts it is
> 0
Excess placement is still concentrated in the basalt-lakes elevation range. That is suggestive of a small remaining error in the same term - a second-order detail of the multisample sub-program (its own grid? its phase? the order of min against the clamp?) rather than a new mechanism.
3. Perf: the two elevation channels can no longer share a memo
VulcanusElevation now exposes cliffElevation beside elevation. They share every sub-expression below the multisample, so the extra cost is one memo table rather than a second DAG (a private DAG was tried first and is much dearer). Measured ~5% on the view:'all' Vulcanus composite, but that was taken on a loaded machine and deserves a proper pnpm perf run.
Worth checking whether the cliff pass can be given a cheaper working set, since it only ever samples the 4-tile corner lattice.
4. Audit other consumers for the same channel mistake
This is the generalisable part. Any consumer that reads a multisample-bearing field on a grid other than 1 tile needs its own variant, and nothing currently checks that. vulcanus_elevation feeds tiles, rocks, resources and cliffs; cliffs are the only one known to walk a coarser grid, but that was an assumption until it was measured for cliffs, and the same assumption is currently unexamined for the rest.
Related: docs/noise/vulcanus-multisample-NOTES.md is amended with the corrected rule and the reason its original 150/150 measurement supported a false generalisation - every comparison came through one channel.
5. Also still open, unchanged by this
Follow-up to #18, which is resolved:
multisample's offsets are in the calling noise program's grid units, sovulcanus_basalt_lakes_multisample's min-filter spans 4 tiles for cliffs and 1 for per-tile consumers (PR #83,test/multisampleGrid.spec.ts).That took the Vulcanus cliff port from recall 0.806/0.938/0.853 with 12.5% wrong orientations to recall 1.000/0.973/0.965 with 2.4%. This issue tracks what is left.
1. The residual itself
37 of 1531 matched cells still carry a wrong orientation, and precision is 0.872 (1756 placed vs 1569 real) without the lava-collision rejection, which the shipping renderer applies and this measurement does not. Per region:
[0,0][1500,1500][-1200,800]Almost all the surviving over-placement is
[1500,1500](~209 cells;[0,0]is down to 9). First step is to re-measure with the lava rejection applied, which is how the renderer actually runs - it may account for much of the 187-cell excess.2. A small regime split survives, with the same shape as the bug just fixed
test/vulcanusElevationLevels.spec.tssweepscliff_elevation_0and inverts the generator's own elevation. Before the fix the over-placement ratio was 1.20-1.49 below elevation 120 and 1.00-1.04 above - a clean edge at exactly where120 * vulcanus_basalt_lakes_multisamplesaturates. After the fix it is 1.000-1.085 everywhere, but the split has not gone to zero:> 0Excess placement is still concentrated in the basalt-lakes elevation range. That is suggestive of a small remaining error in the same term - a second-order detail of the multisample sub-program (its own grid? its phase? the order of
minagainst the clamp?) rather than a new mechanism.3. Perf: the two elevation channels can no longer share a memo
VulcanusElevationnow exposescliffElevationbesideelevation. They share every sub-expression below the multisample, so the extra cost is one memo table rather than a second DAG (a private DAG was tried first and is much dearer). Measured ~5% on theview:'all'Vulcanus composite, but that was taken on a loaded machine and deserves a properpnpm perfrun.Worth checking whether the cliff pass can be given a cheaper working set, since it only ever samples the 4-tile corner lattice.
4. Audit other consumers for the same channel mistake
This is the generalisable part. Any consumer that reads a
multisample-bearing field on a grid other than 1 tile needs its own variant, and nothing currently checks that.vulcanus_elevationfeeds tiles, rocks, resources and cliffs; cliffs are the only one known to walk a coarser grid, but that was an assumption until it was measured for cliffs, and the same assumption is currently unexamined for the rest.Related:
docs/noise/vulcanus-multisample-NOTES.mdis amended with the corrected rule and the reason its original 150/150 measurement supported a false generalisation - every comparison came through one channel.5. Also still open, unchanged by this
[1500,1500], since[0,0]'s false-positive population collapsed from 103 to 9.