From 56a069abb41a4b2c60ab119c8cdac13c4e2813d2 Mon Sep 17 00:00:00 2001 From: chasse20 Date: Mon, 23 Nov 2026 20:42:13 -0500 Subject: [PATCH] Measure the physical copy boundary in dense quadrant trees --- docs/parity-fixes.md | 23 +++++++++++++++++++++++ docs/sbs-root-nodes.md | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/parity-fixes.md b/docs/parity-fixes.md index fee3e3ca..3f7793cc 100644 --- a/docs/parity-fixes.md +++ b/docs/parity-fixes.md @@ -59,6 +59,29 @@ The first pass classifies all 546 roots: 166 Parity and 380 Too hard. These meas ## 2026-11-23 root comparisons +### Physical copy boundaries in dense quadrant subtrees + +At 16 × 32, scale 1, roughness 1, disorder 0 and seed 0, all four original and four reopened F32 captures of Noise BNW Spots 1 agree bit for bit. MaterialCraft matches **370/512 pixels** on each, maximum 1.19209290e−7. Levels 1–5 alone match all 512. This gives a repeatable whole graph for testing how deeper draws combine. At 64 × 32 and scale 3 the same reference desktop produces different whole frames with the same seed. [Eight-capture results for both spots graphs](#bounded-work-for-empty-terminal-quadrants) + +To isolate the first change in draw order, make a complete eight-subdivision quadrant tree. At depth eight, place pairs of square grids on the same 32² area of an F32 canvas filled with one. Give one grid gain −1 and the other 2⁻²⁵. The overlap records either zero or 2⁻²⁵. Pack 32 pairs per 256² frame. Measure all 2,016 pairs of depth-three subtrees and reverse the gains on 192 pairs. Earlier active levels emit unit-copy squares of gain 2⁻⁷² away from the readout. Activating depths four through eight submits 1,364 copies per depth-three subtree. Starting at depth three adds one copy. + +| Order tested against the reference | Settings | Exact F32 pixels | Maximum error | +|---|---:|---:|---:| +| Previously measured terminal order, 1,364 copies | 69 | 4,521,984/4,521,984 | 0 | +| Same order, 1,365 copies | 69 | 4,063,232/4,521,984 | 2.98023224e−8 | +| Order recovered at 1,365, positive readout reflected in both axes | 69 | 4,521,984/4,521,984 | 0 | +| Positions ranked separately, then reflected after adding a depth-two draw per four subtrees | 69 | 4,521,609/4,521,984 | 2.98023224e−8 | +| Same reflection with 64 extra horizontal copies per subtree | 69 | 4,457,623/4,521,984 | 2.98023224e−8 | +| Same reflection with varying extra copies | 69 | 4,494,769/4,521,984 | 2.98023224e−8 | + +For an independent test, overlap all 64 subtree grids on the same square of side .125 centered at (.5625,.4375). Use unit-size additive squares on depths three through eight with gain multipliers (1, −.75, 1.625, −.03125, .1875, −.375). Reflect the horizontal and vertical axes of each descendant according to the two low bits of its subtree's Morton index. For case j, generate 64 gains uniformly in [−.75,.75) with PCG64 seed 938137 + 49j and round to F32. In cases 2, 3 and 4 multiply every third gain, starting at zero, by 2⁻¹⁸. Use graph seed 35173 + 17j at 256², 512 × 256, 256 × 512, 128 × 256, 256 × 128 and 128² in that order. + +MaterialCraft matches **403,200/409,600**, maximum 4.76837158e−6, against each of the original and reopened packages. Summing in the order measured on the pair probes predicts **409,600/409,600**, maximum zero, on each package, including all 6,400 pixels in the overlap. Filling a quarter of a 5,460-copy batch changes the order even when no shape wraps. Applying the measured sequence directly to a whole spots graph still leaves differences. + +To measure repeated trees, initialize an ordinal in the outer Iterate, advance it at the root quadrant, and use the ordinal and quadrant position to select a marker from a generated input. Compare markers in both gain directions and verify adjacent pairs in independent renders. The depth-three markers pass 63/63 adjacent comparisons in one tree, 127/127 in two, and 255/255 in four. One four-tree comparison gave inconsistent gain reversals in the first capture. Four fresh captures in both directions agreed, and the independent adjacent comparisons passed. + +On two trees, mark all 32 depth-two draws, all 128 depth-three draws, and the first, middle (Morton index 511) and last leaf in each depth-three subtree. Both the single-copy field and a field with an extra horizontal copy at every depth-six draw pass 543/543 adjacent comparisons. The depth-three starts retain the same relative order in both. Some final leaves fall after the next subtree has started. With the two observed orders and the actual spot copy counts, replaying the full 16 × 32 case gives 437/512 and 438/512 pixels respectively, maximum 1.19209290e−7. The remainder still needs a common rule for mixed shapes and copy counts. + ### Bounded work for empty terminal quadrants A quadrant can evaluate its properties, produce no shape and finish with every child disconnected or behind a cached empty switch. After evaluating the properties and resolving the children, the evaluator charges the visit to the existing discard allowance while units remain. An empty terminal quadrant uses an ordinary visit once that allowance runs out. A quadrant with no shape and a live child also uses an ordinary visit. [Evaluator](../crates/nodes/src/pattern/evaluation.rs) [Budget regression](../crates/nodes/src/pattern/tests.rs) diff --git a/docs/sbs-root-nodes.md b/docs/sbs-root-nodes.md index 4d17d824..71b52144 100644 --- a/docs/sbs-root-nodes.md +++ b/docs/sbs-root-nodes.md @@ -405,7 +405,7 @@ Creased matches 10,947,840/10,947,840 pixels across 100 distinct settings throug | [multiangle_to_normal.sbs/angle_weight](../assets/sbs/multiangle_to_normal.sbs) | 1 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) | | [noise_anisotropic_noise.sbs/anisotropic_noise](../assets/sbs/noise_anisotropic_noise.sbs) | 0 | Yes | [Parity · 18 renders, all 171,264 pixels exact](parity-fixes.md#quarter-turn-directional-blur) · [Saved graph seed and output-format checks](parity-fixes.md#graph-random-seed-inheritance-on-save-and-in-nested-graphs) | | [noise_anisotropic_noise_v2.sbs/anisotropic_noise_v2](../assets/sbs/noise_anisotropic_noise_v2.sbs) | 0 | No | [Parity · 18 renders, all 171,264 pixels exact](parity-fixes.md#high-pass-anisotropic-noise-and-triangle-grid-controls) | -| [noise_bnw_spots_1.sbs/bnw_spots_1](../assets/sbs/noise_bnw_spots_1.sbs) | 0 | Yes | [In progress · 782,741/841,728 pixels on one processor, 788,160/841,728 on eight across 86 settings](parity-fixes.md#first-level-draw-order-in-repeated-spot-quadrants) · [Eight additional 64 × 32 F32 isolates cook](parity-fixes.md#bounded-work-for-empty-terminal-quadrants) · [Five levels combined, original and reopened, each 8,192/8,192 F32](parity-fixes.md#wide-first-level-shapes-in-additive-quadrant-trees) · [Depths 3–6 match 32,768/32,768 isolated F32 pixels](parity-fixes.md#submission-order-in-underfilled-eight-level-quadrant-trees) · [Earlier 60-setting comparison](parity-fixes.md#connected-quadrant-depth-and-amplified-spot-patterns) · [Zero roughness exact in U16 and F32](parity-fixes.md#grayscale-pattern-output-at-zero-roughness) · [Draw order, 18 changed-format comparisons](parity-fixes.md#draw-order-for-overlapping-procedural-grayscale-stamps) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit renderer workers and repeatability](parity-fixes.md#patterns-with-an-explicit-reference-worker-count) | +| [noise_bnw_spots_1.sbs/bnw_spots_1](../assets/sbs/noise_bnw_spots_1.sbs) | 0 | Yes | [In progress · 782,741/841,728 pixels on one processor, 788,160/841,728 on eight across 86 settings](parity-fixes.md#first-level-draw-order-in-repeated-spot-quadrants) · [370/512 in eight identical whole captures at 16 × 32, with a measured copy boundary in the deeper quadrants](parity-fixes.md#physical-copy-boundaries-in-dense-quadrant-subtrees) · [Eight additional 64 × 32 F32 isolates cook](parity-fixes.md#bounded-work-for-empty-terminal-quadrants) · [Five levels combined, original and reopened, each 8,192/8,192 F32](parity-fixes.md#wide-first-level-shapes-in-additive-quadrant-trees) · [Depths 3–6 match 32,768/32,768 isolated F32 pixels](parity-fixes.md#submission-order-in-underfilled-eight-level-quadrant-trees) · [Earlier 60-setting comparison](parity-fixes.md#connected-quadrant-depth-and-amplified-spot-patterns) · [Zero roughness exact in U16 and F32](parity-fixes.md#grayscale-pattern-output-at-zero-roughness) · [Draw order, 18 changed-format comparisons](parity-fixes.md#draw-order-for-overlapping-procedural-grayscale-stamps) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit renderer workers and repeatability](parity-fixes.md#patterns-with-an-explicit-reference-worker-count) | | [noise_bnw_spots_1_v2.sbs/bnw_spots_1](../assets/sbs/noise_bnw_spots_1_v2.sbs) | 0 | No | [In progress · 831,506/842,752 pixels on one processor, 831,311/842,752 on eight · 87 settings](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [Two additional 64 × 32 isolates, each 2,048/2,048 F32](parity-fixes.md#bounded-work-for-empty-terminal-quadrants) · [Levels 7–8, 8,047/8,192 F32 on original, 8,048/8,192 reopened](parity-fixes.md#wide-first-level-shapes-in-additive-quadrant-trees) · [Earlier spot comparison](parity-fixes.md#connected-quadrant-depth-and-amplified-spot-patterns) · [Zero roughness exact in U16 and F32](parity-fixes.md#grayscale-pattern-output-at-zero-roughness) · [Draw order, 18 changed-format comparisons](parity-fixes.md#draw-order-for-overlapping-procedural-grayscale-stamps) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit renderer workers and repeatability](parity-fixes.md#patterns-with-an-explicit-reference-worker-count) | | [noise_bnw_spots_3.sbs/bnw_spots_3](../assets/sbs/noise_bnw_spots_3.sbs) | 0 | Yes | [In progress · 671,452/671,744 pixels on one processor, 671,526/671,744 on eight · 48 of 62 settings rendered](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [Earlier spot comparison](parity-fixes.md#deep-pattern-samples-in-custom-render-and-tiling-regions) · [Earlier matrix](parity-fixes.md#bnw-spots-3-and-cells-1-pattern-sources) · [64² precision and remaining traversal limits](parity-fixes.md#precision-of-two-dense-noise-generators-in-custom-regions) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit worker counts](parity-fixes.md#branch-offsets-center-culling-and-two-dense-spot-graphs) · [Four-format square and reopened comparisons](parity-fixes.md#two-dense-spots-packages-across-storage-formats) | | [noise_bnw_spots_3_v2.sbs/bnw_spots_3](../assets/sbs/noise_bnw_spots_3_v2.sbs) | 0 | No | [In progress · dense 32² now renders, 1,024/1,024 on one worker, 894/1,024 on desktop](parity-fixes.md#bounded-work-for-terminal-quadrant-siblings) · [Earlier comparison · 339,986/347,136 pixels on one processor, 341,093/347,136 on eight · 30 of 62 settings rendered](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [Earlier spot comparison](parity-fixes.md#bnw-spots-3-and-cells-1-pattern-sources) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [bounded stage counts at scale two](parity-fixes.md#four-cloud-noise-generators-and-repeated-saved-file-comparisons) · [Explicit worker counts](parity-fixes.md#branch-offsets-center-culling-and-two-dense-spot-graphs) · [Dense F32 traversal and worker repeats](parity-fixes.md#dense-quadrant-traversal-and-reference-worker-counts) · [Four-format square and reopened comparisons](parity-fixes.md#two-dense-spots-packages-across-storage-formats) |