From f7f4e32286a62c871ad52a99a491e613ae380d38 Mon Sep 17 00:00:00 2001 From: chasse20 Date: Thu, 26 Nov 2026 00:29:32 -0500 Subject: [PATCH] Count repeated quadrant draws within their physical subtrees --- crates/nodes/src/pattern/evaluation.rs | 5 +- crates/nodes/src/pattern/mixed_depth_runs.rs | 19 +++++- .../src/pattern/tests/terminal_quadrants.rs | 61 ++++++++++++++++-- crates/nodes/src/pattern/tile_runs.rs | 12 ++++ .../pattern/tile_runs/inactive_children.rs | 30 +++++++-- .../tile_runs/inactive_children/tests.rs | 30 +++++++++ docs/parity-fixes.md | 64 +++++++++++++++++++ docs/sbs-root-nodes.md | 6 +- 8 files changed, 210 insertions(+), 17 deletions(-) diff --git a/crates/nodes/src/pattern/evaluation.rs b/crates/nodes/src/pattern/evaluation.rs index d502e1f6..0dbc6690 100644 --- a/crates/nodes/src/pattern/evaluation.rs +++ b/crates/nodes/src/pattern/evaluation.rs @@ -539,10 +539,11 @@ fn evaluate(context: &CookContext, base_level_only: &[bool], visit_limit: usize, && let Some(Some(child)) = node.children.get(1) && !empty_switches.contains(child) { - // An inner iterator that submits multiple branches breaks the complete quadrant layout. if visit.depth > 0 && (repeats_left != 0 || !children.is_empty()) { seven_level_runs = None; - mixed_depth_runs = None; + if !children.is_empty() || mixed_depth_runs.as_mut().is_some_and(|runs| !runs.repeat_parent(visit.depth, repeats_left)) { + mixed_depth_runs = None; + } } // Each connected visit costs at least one unit, even if its stamp is discarded. // A fixed switch can discover an empty branch on its first visit and skip the rest. diff --git a/crates/nodes/src/pattern/mixed_depth_runs.rs b/crates/nodes/src/pattern/mixed_depth_runs.rs index 16efc253..b237a9f5 100644 --- a/crates/nodes/src/pattern/mixed_depth_runs.rs +++ b/crates/nodes/src/pattern/mixed_depth_runs.rs @@ -9,6 +9,8 @@ use super::{ }; use crate::CookContext; +const DEPTH_SEVEN_PARENTS: usize = 4_usize.pow(7); + // Each pair is the exclusive end in depth-seven parent visits and its compositing position. // The boundaries come from overlapping original squares. A prefix can end inside a grandchild. const TWO_CHILDREN: &[(usize, usize)] = &[ @@ -97,6 +99,7 @@ pub(super) struct MixedDepthRuns { starts: Vec, next_boundary: usize, parents: usize, + extra_parents: usize, saw_root: bool, children_per_parent: usize, draws_per_parent: usize, @@ -131,6 +134,7 @@ impl MixedDepthRuns { } if depth != 7 { return match depth { + 5 if self.deepest == 10 => node.children.iter().all(Option::is_some) && self.copies.as_mut().is_some_and(TileCopies::begin_inactive_subtree), 0..=6 => node.children.iter().flatten().count() == 4, 8 if self.deepest == 9 => node.children.iter().all(Option::is_some), // Connected child routes can terminate without visiting another quadrant. @@ -164,6 +168,16 @@ impl MixedDepthRuns { true } + // A second visit to a drawing parent belongs to the same depth-five subtree. + // An iteration at another level changes which subtrees can submit together. + pub(super) fn repeat_parent(&mut self, depth: u32, repeats_left: u32) -> bool { + if self.deepest != 10 || depth != 7 || repeats_left != 1 || self.extra_parents == DEPTH_SEVEN_PARENTS { + return false; + } + self.extra_parents += 1; + true + } + pub(super) fn draw(&mut self, stamp: &PatternStamp, opacities: &[f32], retained: bool) -> bool { let Some(weight) = opacities.get(stamp.depth as usize) else { return false }; // Turning off unrelated draws changes the order even where those draws never overlap the readout. @@ -181,7 +195,10 @@ impl MixedDepthRuns { } pub(super) fn finish(mut self, stamps: &[PatternStamp]) -> Option>> { - if self.parents != 16384 || self.draws != self.parents * self.draws_per_parent || self.starts.len() != self.layout.len() { + if self.parents != DEPTH_SEVEN_PARENTS + self.extra_parents + || self.draws != self.parents * self.draws_per_parent + || self.starts.len() != self.layout.len() + { return None; } if self.deepest == 10 { diff --git a/crates/nodes/src/pattern/tests/terminal_quadrants.rs b/crates/nodes/src/pattern/tests/terminal_quadrants.rs index e31a5526..9112aca3 100644 --- a/crates/nodes/src/pattern/tests/terminal_quadrants.rs +++ b/crates/nodes/src/pattern/tests/terminal_quadrants.rs @@ -178,12 +178,46 @@ fn final_pair_location(draw: u32) -> (u32, u32) { if child == 0 { (512 + x, y) } else { (2 * x + (child - 1) % 2, 2 * y + (child - 1) / 2) } } -fn check_final_pair_markers(inactive_children: bool, wrapped: bool, origin: [f32; 2], markers: &[(u32, u32, bool)]) { +enum FinalPairTree { + Plain, + InactiveChildren, + RepeatedChildren, +} + +fn first_quadrant_repeat_offset() -> Value { + let mut graph = FunctionGraph::default(); + let pos = graph.add("get_float2", &[], Some(Value::Text("$pos".into()))); + let x = graph.add("swizzle1", &[pos], Some(Value::Int(0))); + let y = graph.add("swizzle1", &[pos], Some(Value::Int(1))); + let furthest = graph.add("max", &[x, y], None); + let boundary = graph.add_constant(Value::Float(1.0 / 64.0)); + let first = graph.add("lr", &[furthest, boundary], None); + let two = graph.add_constant(Value::Int(2)); + let one = graph.add_constant(Value::Int(1)); + let count = graph.add("ifelse", &[first, two, one], None); + let set = graph.add("set", &[count], Some(Value::Text("child_repeat".into()))); + let offset = graph.add_constant(Value::Float2([0.0; 2])); + graph.output = Some(graph.add("sequence", &[set, offset], None)); + Value::Function(Box::new(graph)) +} + +fn check_final_pair_markers(tree: FinalPairTree, wrapped: bool, origin: [f32; 2], markers: &[(u32, u32, bool)]) { + let inactive_children = !matches!(tree, FinalPairTree::Plain); let mut graph = PatternGraph::with_root(PatternNodeKind::Quadrant); let mut parent = graph.root.unwrap(); for depth in 1..=8 { let child = graph.add(PatternNodeKind::Quadrant).unwrap(); graph.nodes[(parent - 1) as usize].children.fill(Some(child)); + if depth == 7 && matches!(tree, FinalPairTree::RepeatedChildren) { + // Only the first depth-six quadrant submits each of its children twice. + let relay = graph.add(PatternNodeKind::Iterate).unwrap(); + let mut count = FunctionGraph::default(); + count.output = Some(count.add("get_integer1", &[], Some(Value::Text("child_repeat".into())))); + graph.nodes[(relay - 1) as usize].parameters.insert("numberadded".into(), Value::Function(Box::new(count))); + graph.nodes[(relay - 1) as usize].children[1] = Some(child); + graph.nodes[(parent - 1) as usize].parameters.insert("branchoffset".into(), first_quadrant_repeat_offset()); + graph.nodes[(parent - 1) as usize].children.fill(Some(relay)); + } if depth >= 7 { let offset = [if depth == 7 { 0.5 } else { 0.0 }, 0.0]; let mut parameters = additive_square(0.25, [0.0; 2], [0.0; 2]); @@ -256,7 +290,7 @@ fn check_final_pair_markers(inactive_children: bool, wrapped: bool, origin: [f32 #[test] fn final_pair_batches_precede_the_next_subtree_above_inactive_children() { check_final_pair_markers( - true, + FinalPairTree::InactiveChildren, false, [0.0; 2], &[ @@ -276,20 +310,35 @@ fn final_pair_batches_precede_the_next_subtree_above_inactive_children() { (40959, 44109, false), ], ); - check_final_pair_markers(true, true, [0.0; 2], &[(64000, 20559, true), (23599, 24029, false), (76101, 7902, true), (69817, 48750, true)]); - check_final_pair_markers(true, false, [0.125, -0.25], &[(36180, 51209, false), (30717, 30722, false), (56659, 10240, true)]); + check_final_pair_markers( + FinalPairTree::InactiveChildren, + true, + [0.0; 2], + &[(64000, 20559, true), (23599, 24029, false), (76101, 7902, true), (69817, 48750, true)], + ); + check_final_pair_markers(FinalPairTree::InactiveChildren, false, [0.125, -0.25], &[(36180, 51209, false), (30717, 30722, false), (56659, 10240, true)]); +} + +#[test] +fn inactive_quadrants_count_repeated_draws_in_their_own_subtree() { + check_final_pair_markers( + FinalPairTree::RepeatedChildren, + false, + [0.0; 2], + &[(30719, 2880, true), (49479, 36180, true), (63999, 23520, true), (67359, 8980, true)], + ); } #[test] fn final_pair_batches_keep_the_four_child_order_with_one_tiling_axis() { check_final_pair_markers( - false, + FinalPairTree::Plain, true, [0.0; 2], &[(43841, 15684, true), (2893, 41170, false), (7078, 57951, false), (27212, 9738, false), (28838, 38806, false), (46736, 72040, false)], ); check_final_pair_markers( - false, + FinalPairTree::Plain, false, [0.0; 2], &[ diff --git a/crates/nodes/src/pattern/tile_runs.rs b/crates/nodes/src/pattern/tile_runs.rs index 76a6eea9..0b270bd1 100644 --- a/crates/nodes/src/pattern/tile_runs.rs +++ b/crates/nodes/src/pattern/tile_runs.rs @@ -73,8 +73,20 @@ impl TileCopies { self.positions.record(count, retained) } + pub(super) fn begin_inactive_subtree(&mut self) -> bool { + if self.subtree_ends.len() == 4_usize.pow(5) { + return false; + } + self.subtree_ends.push(self.positions.total); + true + } + pub(super) fn record(&mut self, stamp: &PatternStamp, retained: bool, draws: usize, draws_per_parent: usize) -> Option<()> { let end = self.count_stamp(Some(stamp), retained)?.end; + if self.parents_per_subtree == DEPTH_FIVE_PARENTS { + *self.subtree_ends.last_mut()? = end; + return Some(()); + } if draws.is_multiple_of(draws_per_parent * self.parents_per_subtree) { let parents = draws / draws_per_parent; // Count the eight pairs in the final quadrant. Their combined occupancy determines diff --git a/crates/nodes/src/pattern/tile_runs/inactive_children.rs b/crates/nodes/src/pattern/tile_runs/inactive_children.rs index 02d80f52..ef91bcbe 100644 --- a/crates/nodes/src/pattern/tile_runs/inactive_children.rs +++ b/crates/nodes/src/pattern/tile_runs/inactive_children.rs @@ -106,7 +106,19 @@ fn completed_half(ends: &[u32], group: usize, partner: usize) -> Option<[Range]) -> Option>> { +fn full_outer_pair(ends: &[u32]) -> Option<[Range; 2]> { + let preceding = copies(ends, 60 * SUBTREES..62 * SUBTREES)?; + let own = copies(ends, 62 * SUBTREES..64 * SUBTREES)?; + let incoming = copies(ends, 48 * SUBTREES..50 * SUBTREES)?; + let room = COPIES_PER_BATCH.checked_sub(own.end - own.start)?; + // An independently full outer pair has a different submission boundary. + if preceding.end - preceding.start >= COPIES_PER_BATCH || room == 0 || !(room..COPIES_PER_BATCH).contains(&(incoming.end - incoming.start)) { + return None; + } + Some([own, incoming.start..incoming.start + room]) +} + +fn following_batches(ends: &[u32], receivers: &[ReceivingPair], leading: &[Range], outer_submitted: bool) -> Option>> { let [first, middle, last] = receivers else { return None }; let handoff = first.handoff.as_ref()?; let middle_siblings = copies(ends, middle.pending.clone())?; @@ -127,7 +139,7 @@ fn following_batches(ends: &[u32], receivers: &[ReceivingPair], leading: &[Range let mut full = leading.to_vec(); full.extend(order.into_iter().flatten().cloned()); let tails = [first.tail.clone(), middle_siblings, last.tail.clone()]; - if let Some(completed) = completion::ranges(ends, receivers, &halves, third.start + COPIES_PER_BATCH..third.end, &full, &tails) { + if !outer_submitted && let Some(completed) = completion::ranges(ends, receivers, &halves, third.start + COPIES_PER_BATCH..third.end, &full, &tails) { return Some(completed); } full.extend(tails); @@ -141,10 +153,18 @@ pub(super) fn ranges(ends: &[u32]) -> Option>> { let mut runs = Vec::new(); for group in LEADING_SUBTREES { let half = copies(ends, group * SUBTREES..(group + 8) * SUBTREES)?; - if !(COPIES_PER_BATCH..2 * COPIES_PER_BATCH).contains(&(half.end - half.start)) { + let batches = (half.end - half.start) / COPIES_PER_BATCH; + if !(1..=2).contains(&batches) { return None; } - runs.push(half.start..half.start + COPIES_PER_BATCH); + runs.push(half.start..half.start + batches * COPIES_PER_BATCH); + } + // The last two depth-three subtrees continue into the first two of the same + // root quadrant. A complete batch submits before work reaches the receivers. + let outer = full_outer_pair(ends); + let outer_submitted = outer.is_some(); + if let Some(pair) = outer { + runs.extend(pair); } // The final root quadrant sends one pair of depth-three subtrees to each // receiving half. Each receiver can submit two complete batches. @@ -154,7 +174,7 @@ pub(super) fn ranges(ends: &[u32]) -> Option>> { runs.extend_from_slice(&pair.runs); receivers.push(pair); } - if let Some(following) = following_batches(ends, &receivers, &runs) { + if let Some(following) = following_batches(ends, &receivers, &runs, outer_submitted) { runs = following; } // Preserve every remaining physical copy in traversal order. diff --git a/crates/nodes/src/pattern/tile_runs/inactive_children/tests.rs b/crates/nodes/src/pattern/tile_runs/inactive_children/tests.rs index bec7891a..d34f3494 100644 --- a/crates/nodes/src/pattern/tile_runs/inactive_children/tests.rs +++ b/crates/nodes/src/pattern/tile_runs/inactive_children/tests.rs @@ -45,6 +45,36 @@ fn a_full_receiving_pair_reorders_the_following_two_batches() { } } +#[test] +fn inactive_quadrants_submit_a_second_full_batch_from_the_same_half() { + // Place 679 or 680 independent squares across the same tile edge. The last + // extra copy fills the second batch before the next half starts drawing. + for (extra, before) in [(679, false), (680, true)] { + let mut copies = vec![1; 81_920]; + for i in 0..extra { + copies[24 * 1280 + (1777 * i + 31) % 10240] = 2; + } + let ranks = ranks_for_copies(|draw| copies[draw]); + for (left, right) in [(36173, 15446), (37269, 12312), (36456, 11047)] { + assert_eq!(ranks[left] < ranks[right], before, "{extra} extra copies, draws {left}, {right}"); + } + } +} + +#[test] +fn inactive_quadrants_submit_a_full_outer_pair_before_the_receivers() { + for (extra, before) in [(339, false), (340, true)] { + let mut copies = vec![1; 81_920]; + for i in 0..extra { + copies[62 * 1280 + (233 * i + 71) % 2560] = 2; + } + let ranks = ranks_for_copies(|draw| copies[draw]); + for (left, right) in [(80736, 65485), (80128, 65100), (63952, 66509)] { + assert_eq!(ranks[left] < ranks[right], before, "{extra} extra copies, draws {left}, {right}"); + } + } +} + #[test] fn receiving_tails_and_deferred_siblings_follow_the_full_batches() { let rank = draw_ranks(0); diff --git a/docs/parity-fixes.md b/docs/parity-fixes.md index c0a7e73b..a390e3f0 100644 --- a/docs/parity-fixes.md +++ b/docs/parity-fixes.md @@ -57,6 +57,70 @@ The first pass classifies all 546 roots: 166 Parity and 380 Too hard. These meas - **2026-11-13 - Unconnected output images:** Unconnected output bridges now produce transparent RGBA instead of grayscale. The importer separately retains each output's declared image type so saving an unconnected output preserves the graph interface. Both material templates match all 1,179,648 RGBA8 pixels across six recorded cases. All 2,560 direct grayscale/color declaration probe pixels also match, and both declared image types survive save/reload. +## 2026-11-26 root comparisons + +### Repeated drawing quadrants and full batches in the outer pair + +Start with the [original additive-square graph and its traversal numbering](#tile-copies-in-the-last-two-active-quadrant-levels). Keep both tiling axes and the connected, inactive descendants through depth ten. Between each depth-six quadrant and its children, insert an Iterate with an empty initial branch. On the depth-six branch offset, read the red channel of a 1024² procedural field at texel (256 + x, 512 + y). Here x and y are the 64² quadrant coordinates. Write an integer child count of two for a marked texel or one otherwise, then return a zero offset. Read that count in the Iterate. Each marked depth-six quadrant adds four depth-seven parents and sixteen depth-eight draws. + +Number depth-six quadrants in traversal order, starting at zero. Use six fields with these marked indices. + +| Field | Marked quadrants | +|---|---| +| Control | None | +| First | 0 | +| Receiver | 50 × 64 + 10 | +| Middle | 24 × 64 + 21 and 40 × 64 + 19 | +| Later | 60 × 64 + 12, 62 × 64 + 31 and 48 × 64 + 9 | +| Spread | (211j + 17) mod 4096 for j from 0 through 11 | + +Place a separate square of gain −0.25 in a marked and an unmarked branch. From white, the marked square leaves 0.5 and the unmarked square leaves 0.75. The signed draw-order markers outside the repeated branches agree in both gain directions on all 686 pairs. Previously an inner repeat selected traversal order for the tree. Recording the physical copies at each actual depth-five boundary lets the renderer retain batch order when a subtree contains more than sixteen drawing parents. + +For each field, render both marker directions at 256² F32 with seed 613117, 64 × 128 U8 with seed 613139, 128 × 64 U16 with seed 613141 and 256 × 128 F16 with seed 613163. Reopen the ordinary MaterialCraft save in the reference app and repeat all 48 frames. + +| Output | Original exact pixels | Reopened exact pixels | Maximum error on either | +|---|---:|---:|---:| +| U8 | 98,304/98,304 | 98,304/98,304 | 0 | +| U16 | 98,304/98,304 | 98,304/98,304 | 0 | +| F16 | 393,216/393,216 | 393,216/393,216 | 0 | +| F32 | 786,432/786,432 | 786,432/786,432 | 0 | + +The previous release missed 142 F32 pixels on each route, maximum 2⁻²⁵. All three other formats retained their previous bits. + +To isolate two submission boundaries separately, leave the Iterate count at one. Number 64 depth-three groups of 1,280 draws each. In a leading half starting at group 24, 40 or 8, move draw `1280g + (1777j + 31) mod 10240` to one tile edge for consecutive j starting at zero. At 679 extra copies the half contains 10,919 copies. At 680 it contains 10,920 and submits its second complete batch before the next half starts. Adding a 681st copy leaves that copy pending. Vary each half independently and then fill two or three halves together. + +For the outer pair, group 62 and its following group continue into groups 48 and 49. In either two-group interval move draw `1280g + (233j + 71) mod 2560` to one tile edge. With 339 extra copies in groups 62–63, the outer pair follows the first receiver. At 340 extras it fills a batch of 5,460 and precedes that receiver. The same threshold holds when the extra copies are in groups 48–49 or alternate between the two intervals. A dense field with 5,537 outer copies matched all 537 signed comparisons against the leading halves, receivers and later draws. The final 77 copies were outside that full batch. Separate, underfilled fields still have differences in the order of their later draws. [Boundary regressions](../crates/nodes/src/pattern/tile_runs/inactive_children/tests.rs) · [Repeated Iterate regression](../crates/nodes/src/pattern/tests/terminal_quadrants.rs) + +For whole-image checks, use five disjoint pairs on row 5 in columns 6 through 10 of the 128² marker field. Render both gain directions at 128² F32, 64 × 128 U8, 128 × 64 U16 and 256 × 128 F16 with seeds 614131, 614159, 614171 and 614189 respectively. In the last two fields put 680 extra copies in each leading half starting at group 24 or 40. Alternate the outer extras between groups 62 and 48, advancing the local index after each pair. + +| Placement and extra copies | Traversal indices for the five marker pairs | +|---|---| +| Leading half, 679 | (38865,51618), (36173,15446), (36836,55838), (37269,12312), (39867,54119) | +| Leading half, 680 | (38865,51618), (36173,15446), (36836,55838), (37269,12312), (39868,54119) | +| Outer group 62, 339 | (63311,64861), (62714,66424), (61880,65431), (81655,64132), (63326,64047) | +| Outer group 62, 340 | (63312,64861), (62715,66424), (61881,65431), (81656,64132), (63327,64047) | +| Alternating, 339 | (63266,65301), (62624,64826), (61727,65835), (81486,64277), (63281,66203) | +| Alternating, 340 | (63267,65301), (62625,64826), (61727,65835), (81486,64277), (63282,66203) | + +The 48 originals and their 48 ordinary saves each match 786,432/786,432 pixels, maximum zero. Each route gives 98,304 exact U8, 98,304 exact U16, 393,216 exact F16 and 196,608 exact F32 pixels. The previous release gave 786,408/786,432 on each route with a maximum F32 error of 2⁻²⁵. + +In the second Spots 1 graph, set scale to 1, roughness to 0.875, disorder to 0.1875, speed to 0.5, anisotropy to 0.25, non-square expansion to false and tile offset to (−0.1875, 0.0625). In a MaterialCraft trace, a diagnostic draw on the initial branch of each depth-seven Iterate distinguished one visit from two. Removing the diagnostic stamps from the trace left every original stamp's geometry unchanged. At 32 × 16 and seed 561067, 15,379 parents drew once and 1,005 drew twice. Their 1,024 depth-five subtrees contained 16 through 22 drawing parents. The first three leading halves, in submission order, contained 10,949, 11,084 and 10,849 physical copies. + +| Size and seed, F32 | One processor, before → after | Fresh eight processors, before → after | Ordinary save, before → after | Maximum error after, one / eight / save | +|---|---:|---:|---:|---:| +| 32 × 16, 561067 | 460 → 497/512 | 472 → 467/512 | 460 → 497/512 | 2⁻²⁴ / 2⁻²⁴ / 2⁻²⁴ | +| 32 × 16, 614019 | 465 → 497/512 | 465 → 477/512 | 465 → 497/512 | 2⁻²⁴ / 2⁻²³ / 2⁻²⁴ | +| 16 × 32, 614041 | 462 → 500/512 | 475 → 473/512 | 462 → 500/512 | 2⁻²⁴ / 2⁻²⁴ / 2⁻²⁴ | +| 32², 614063 | 940 → 989/1,024 | 927 → 945/1,024 | 940 → 989/1,024 | 2⁻²⁴ / 2⁻²³ / 2⁻²⁴ | + +Across the three new seeds U8, U16 and F16 each matched all 2,048/2,048 pixels on one processor, on eight and on reopening, maximum zero. The archived eight-processor F32 capture at seed 561067 gives 459/512, previously 470/512. Its maximum error rose from 2⁻²⁴ to 2⁻²³. The other three [earlier F32 settings](#completing-partial-copy-batches-above-inactive-quadrants) stayed at 256/256, 512/512 and 1,024/1,024 on one processor and on reopening. + +Repeat the 32 × 16 F32 at seed 561067 in four separate reference renders per processor count. All 512 positions were identical across the four one-processor renders. On eight processors, 435/512 positions were identical across the four, and MaterialCraft matched 428 of those 435. It matched at least one of the four values at 505/512 positions. Against individual renders it matched 460, 463, 480 and 471 pixels, maximum 2⁻²⁴ in each. Two eight-processor reference renders differed by as much as 2⁻²³. The seven stable positions that differ from MaterialCraft remain open. + +Across the established 87 Spots 1 v2 settings and 19 ordinary saves, all 106 output digests match the previous release. The counts remain 839,402/842,752 on one processor, 830,541/842,752 on eight and 137,715/139,008 after reopening. Whole-frame counts remain 62/87, 58/87 and 13/19 respectively. [Counts and maximum errors by output format](#completing-partial-copy-batches-above-inactive-quadrants) + +The first Spots 1 graph retained all 86 original and 19 reopened frame digests. It matches 824,569/841,728 on one processor, 776,831/841,728 on eight and 196,193/196,352 after reopening. Both roots remain in progress. The three new regressions failed against the previous implementation. All 542 node and evaluator release tests passed with the changes. Formatting, strict workspace Clippy, dependency layering and WebAssembly passed. + ## 2026-11-25 root comparisons ### Completing partial copy batches above inactive quadrants diff --git a/docs/sbs-root-nodes.md b/docs/sbs-root-nodes.md index 010044a1..bab8b8ac 100644 --- a/docs/sbs-root-nodes.md +++ b/docs/sbs-root-nodes.md @@ -35,7 +35,7 @@ A graph may accept input pins and still be a root under the dependency criterion Statuses: **Not checked**, **In progress**, **Parity** (exact pixels or typed values for the linked measured cases), or **Too hard** (reason recorded). Function calls do not count as regular graph dependencies. -The first pass covered all **546 roots**, with **166 Parity** and **380 Too hard**. The current inventory has **480 Parity**, **66 In progress** and **0 Too hard**. The November 17–25 comparisons include raw counts, output formats and remaining differences. [November 17 measurements](parity-fixes.md#2026-11-17-root-comparisons) · [November 18 measurements](parity-fixes.md#2026-11-18-root-comparisons) · [November 19 measurements](parity-fixes.md#2026-11-19-root-comparisons) · [November 20 measurements](parity-fixes.md#2026-11-20-root-comparisons) · [November 21 measurements](parity-fixes.md#2026-11-21-root-comparisons) · [November 22 measurements](parity-fixes.md#2026-11-22-root-comparisons) · [November 23 measurements](parity-fixes.md#2026-11-23-root-comparisons) · [November 24 measurements](parity-fixes.md#2026-11-24-root-comparisons) · [November 25 measurements](parity-fixes.md#2026-11-25-root-comparisons) +The first pass covered all **546 roots**, with **166 Parity** and **380 Too hard**. The current inventory has **480 Parity (87.9%)**, **66 In progress** and **0 Too hard**. The first eleven open roots match every pixel across 1,059 recorded single-processor settings. Each still differs in at least one eight-processor capture. The November 17–26 comparisons give raw counts, output formats and remaining differences. [November 17 measurements](parity-fixes.md#2026-11-17-root-comparisons) · [November 18 measurements](parity-fixes.md#2026-11-18-root-comparisons) · [November 19 measurements](parity-fixes.md#2026-11-19-root-comparisons) · [November 20 measurements](parity-fixes.md#2026-11-20-root-comparisons) · [November 21 measurements](parity-fixes.md#2026-11-21-root-comparisons) · [November 22 measurements](parity-fixes.md#2026-11-22-root-comparisons) · [November 23 measurements](parity-fixes.md#2026-11-23-root-comparisons) · [November 24 measurements](parity-fixes.md#2026-11-24-root-comparisons) · [November 25 measurements](parity-fixes.md#2026-11-25-root-comparisons) · [November 26 measurements](parity-fixes.md#2026-11-26-root-comparisons) Writable quadrant tints now match 16,896/16,896 pixels in 44 settings across four output formats, up from 4,608. Fixed and published inputs through a graph instance match 3,840/3,840 original and 3,840/3,840 reopened pixels. Connected image properties match all 18,432 original and all 18,432 reopened pixels across 32 settings, up from 15,168 on each side. Live float4 and integer initial values remain open. The earlier explicit undefined-tint controls covered 70,656 pixels across original squares, ordinary saves, Gaussian and ramp shapes and connected images. [Connected images](parity-fixes.md#connected-image-properties-and-the-first-quadrant-draw) · [Writable floats](parity-fixes.md#first-reads-of-writable-quadrant-floats) · [Explicit undefined tints](parity-fixes.md#undefined-components-in-a-computed-quadrant-tint) @@ -43,7 +43,7 @@ Six upstream filters now match 27,648/27,648 original and 27,648/27,648 reopened Noise BNW Spots 1 matches 824,569/841,728 pixels on one processor, 776,831/841,728 on eight and 196,193/196,352 across 19 ordinary saves. Of 86 original settings, 64 now match in full on one processor and 38 on eight. Four original and four reopened 16 × 32 seed-zero F32 frames match 512/512, maximum zero. Two additional one-processor F32 settings at 32² and 64 × 32 now match all 3,072 original and all 3,072 reopened pixels. The seven-processor captures match 2,282/3,072. Eleven procedural receiving-group controls and their eleven ordinary saves now match all 90,112 pixels across four formats. Denser fields and worker-dependent differences remain open. [Repeated trees, raw counts and maximum errors](parity-fixes.md#full-copy-batches-received-across-repeated-quadrant-trees) [Two new settings and independent square controls](parity-fixes.md#pending-quadrant-siblings-and-the-first-full-receiving-batch) [Procedural fixtures and counts by output format](parity-fixes.md#final-copy-batches-in-one-and-two-quadrant-trees) · [Earlier copy batches](parity-fixes.md#remaining-siblings-at-a-full-quadrant-copy-batch) -Noise BNW Spots 1 v2 matches 839,402/842,752 original pixels on one processor, 830,541/842,752 on eight and 137,715/139,008 across 19 ordinary saves. Four more whole frames match on one processor, bringing that panel to 62/87. U16 and F32 now match every default pixel at 128² and 256² on one processor. The separate 16² and 16 × 32 F32 settings at seeds 560971 and 560983 each match completely, including an ordinary save. Their eight-processor captures match 227/256 and 456/512. Four eight-processor renders of the 16² default differed at 36 positions, and MaterialCraft differed at seven of the 220 stable positions. [Four-format totals and exact defaults](parity-fixes.md#completing-partial-copy-batches-above-inactive-quadrants) · [Identical-input repeats](parity-fixes.md#which-half-quadrant-completes-the-next-copy-batch) · [Intermediate comparisons](parity-fixes.md#final-pattern-draws-above-inactive-quadrants-in-spots-1-v2) +Noise BNW Spots 1 v2 retains 839,402/842,752 original pixels on one processor, 830,541/842,752 on eight and 137,715/139,008 across 19 ordinary saves. Of the 87 originals, 62 whole frames match on one processor and 58 on eight. The separate 32 × 16 F32 setting at seed 561067 rose from 460 to 497/512 on one processor and on reopening. Across three new seeds F32 rose from 1,867 to 1,986/2,048 on those two routes and from 1,867 to 1,895/2,048 on eight processors. U8, U16 and F16 each match all 2,048 pixels on all three routes. Four eight-processor renders at seed 561067 agreed at 435/512 positions, and MaterialCraft matches 428 of those. [Repeated drawing quadrants, exact counts and errors](parity-fixes.md#repeated-drawing-quadrants-and-full-batches-in-the-outer-pair) · [Four-format totals and exact defaults](parity-fixes.md#completing-partial-copy-batches-above-inactive-quadrants) · [16² reference repeats](parity-fixes.md#which-half-quadrant-completes-the-next-copy-batch) Directional Noise 1 retains 734,118/734,464 original pixels on one processor, 734,140/734,464 on eight and 123,081/123,136 across 12 ordinary saves. All seven tested interior Dot and Switch routes match 258,048/258,048 original and 258,048/258,048 reopened pixels across four formats, maximum zero. [Interior route settings and whole-root counts](parity-fixes.md#interior-routes-between-terminal-quadrants) · [Outer routes and repeated captures](parity-fixes.md#outer-routes-into-the-final-three-active-quadrant-levels) @@ -418,7 +418,7 @@ Creased matches 10,947,840/10,947,840 pixels across 100 distinct settings throug | [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 · 824,569/841,728 on one processor, 776,831/841,728 on eight and 196,193/196,352 in 19 saves](parity-fixes.md#full-copy-batches-received-across-repeated-quadrant-trees) · [Two more exact F32 settings on one processor and after reopen](parity-fixes.md#pending-quadrant-siblings-and-the-first-full-receiving-batch) · [Third carried pair and outer routing](parity-fixes.md#carrying-the-third-quadrant-pair-through-an-outer-iteration) · [Earlier cross-tree measurements](parity-fixes.md#full-copy-batches-spanning-successive-quadrant-trees) · [Neighboring quadrants](parity-fixes.md#physical-copy-batches-across-neighboring-quadrants) · [Ninth-batch comparison](parity-fixes.md#connected-graph-depth-and-the-ninth-quadrant-batch) · [Eighth-batch comparison](parity-fixes.md#the-next-full-batch-in-an-eight-level-quadrant-tree) · [Previous 86-setting comparison and 19 saves](parity-fixes.md#a-full-copy-batch-in-the-last-root-quadrant) · [Earlier six batches](parity-fixes.md#leading-copy-batches-in-complete-quadrant-trees) · [Measured physical copy boundary](parity-fixes.md#physical-copy-boundaries-in-dense-quadrant-subtrees) · [Inactive descendants affect draw order, 21/21 independently replayed F32 values](parity-fixes.md#connected-inactive-descendants-and-dense-quadrant-draw-order) · [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 · 839,402/842,752 on one processor, 830,541/842,752 on eight and 137,715/139,008 in 19 saves](parity-fixes.md#completing-partial-copy-batches-above-inactive-quadrants) · [Earlier half-quadrants and reference repeats](parity-fixes.md#which-half-quadrant-completes-the-next-copy-batch) · [Previous tile-copy fix](parity-fixes.md#tile-copies-in-the-last-two-active-quadrant-levels) · [Earlier 87-setting comparison](parity-fixes.md#copy-batches-from-the-final-quadrant-pair-and-the-following-group) · [Final pattern stage and 16² addition-order replay](parity-fixes.md#final-pattern-draws-above-inactive-quadrants-in-spots-1-v2) · [Parameters and earlier comparison](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [All 87 original settings and 19 saves rechecked](parity-fixes.md#dense-settings-recovered-in-the-third-spots-graph) · [Depth-local variable writes fixed, 28,082/28,160 on twelve whole guards](parity-fixes.md#inherited-and-writable-variables-across-quadrant-depths) · [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_1_v2.sbs/bnw_spots_1](../assets/sbs/noise_bnw_spots_1_v2.sbs) | 0 | No | [In progress · 839,402/842,752 on one processor, 830,541/842,752 on eight and 137,715/139,008 in 19 saves](parity-fixes.md#completing-partial-copy-batches-above-inactive-quadrants) · [Repeated parents, three new seeds and processor repeats](parity-fixes.md#repeated-drawing-quadrants-and-full-batches-in-the-outer-pair) · [Earlier half-quadrants and reference repeats](parity-fixes.md#which-half-quadrant-completes-the-next-copy-batch) · [Previous tile-copy fix](parity-fixes.md#tile-copies-in-the-last-two-active-quadrant-levels) · [Earlier 87-setting comparison](parity-fixes.md#copy-batches-from-the-final-quadrant-pair-and-the-following-group) · [Final pattern stage and 16² addition-order replay](parity-fixes.md#final-pattern-draws-above-inactive-quadrants-in-spots-1-v2) · [Parameters and earlier comparison](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [All 87 original settings and 19 saves rechecked](parity-fixes.md#dense-settings-recovered-in-the-third-spots-graph) · [Depth-local variable writes fixed, 28,082/28,160 on twelve whole guards](parity-fixes.md#inherited-and-writable-variables-across-quadrant-depths) · [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 · six more settings render, 49,131/49,152 on one processor, 49,132/49,152 on eight](parity-fixes.md#dense-settings-recovered-in-the-third-spots-graph) · [Earlier 48 settings, 671,452/671,744 pixels on one processor, 671,526/671,744 on eight](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 · 16 of 32 blocked settings now render, 185,202/193,536 on one processor and 184,698/193,536 on eight](parity-fixes.md#recovered-settings-in-the-second-version-of-the-third-spots-graph) · [Three recovered saves, 5,999/6,144](parity-fixes.md#recovered-settings-in-the-second-version-of-the-third-spots-graph) · [Dense 32² comparison](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) | | [noise_cells_1.sbs/cells_1](../assets/sbs/noise_cells_1.sbs) | 0 | Yes | [Parity · 928,000/928,000 pixels across 88 distinct settings on one and eight processors](parity-fixes.md#inverting-the-stored-pixel-projection-in-scaled-stamp-regions) · [Earlier scaled-window comparisons](parity-fixes.md#projecting-stamp-vertices-relative-to-pixel-centers-in-scaled-windows) · [Earlier root comparisons](parity-fixes.md#bnw-spots-3-and-cells-1-pattern-sources) · [717,776/729,344 pixels in 60 settings at one and eight processors](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) |