From 09a309082c3baeff39e879ab39d48b88d7c56fb3 Mon Sep 17 00:00:00 2001 From: chasse20 Date: Sat, 28 Nov 2026 02:39:42 -0500 Subject: [PATCH] Document parity measurements and procedural fixture sources --- ATTRIBUTION.md | 3 +- docs/architecture.md | 5 +-- docs/file-format-parity.md | 13 +++++--- docs/parity-fixes.md | 66 +++++++++++++++++++++----------------- docs/sbs-root-nodes.md | 7 ++-- docs/target-app-parity.md | 5 ++- 6 files changed, 58 insertions(+), 41 deletions(-) diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index f6973b73..2269883a 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -34,7 +34,8 @@ images, materials, sample graphs, presets, environments) may ever be added. | `docs/images/materialcraft-levels-editor.png` | Docs screenshot: the Levels editor with the input histogram | MaterialCraft contributors | Offscreen render of MaterialCraft's UI (`crates/ui-egui/tests/snapshot.rs`) | MIT OR Apache-2.0 | | `docs/brand/artcraft-*.svg`, `docs/brand/artcraft-*.png` | ArtCraft logo and mark | ArtCraft Team | storytold/craftrules `assets/brand/` | ArtCraft brand terms, not open source ([`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt)) | | `crates/nodes/src/atomic/text.rs` (`GLYPHS`) | Single-stroke vector font of the Text node (A–Z, a–z, 0–9, punctuation) | MaterialCraft contributors | Original, designed as stroke data in code | MIT OR Apache-2.0 | -| `assets/sbs/` (every `.sbs` package, recursively), `examples/atomic_sample.sbs` | Procedural node, function graph and material library; atomic sample | ArtCraft Team and the MaterialCraft contributors | Original clean-room recreations of the professional node-based material workflow, created for MaterialCraft; authorship confirmed by the project maintainer | MIT OR Apache-2.0 | +| `assets/sbs/` (every `.sbs` package, recursively) | Procedural node, function graph and material library | ArtCraft Team and the MaterialCraft contributors | Original work created for MaterialCraft. The project maintainer confirmed authorship of the collection. | MIT OR Apache-2.0 | +| [examples/atomic_sample.sbs](examples/atomic_sample.sbs) | Atomic sample graph | ArtCraft Team and the MaterialCraft contributors | [Rust graph generator](crates/engine/src/atomic_sample.rs) and [SBS example writer](crates/engine/examples/atomic_sample.rs) | MIT OR Apache-2.0 | | `assets/sbs/resources/bluenoise_256.png` | 256 × 256 grayscale blue noise, contributor-supplied PNG | Christoph Peters | [Moments in Graphics](https://momentsingraphics.de/BlueNoise.html); contributor-supplied provenance | CC0-1.0 ([license](assets/sbs/resources/LICENSE_BLUE_NOISE.txt)) | | `assets/sbs/resources/bluenoise_256_c.exr` | 256 × 256 color blue noise, contributor-supplied EXR conversion | Christoph Peters | [Moments in Graphics](https://momentsingraphics.de/BlueNoise.html); contributor-supplied provenance | CC0-1.0 ([license](assets/sbs/resources/LICENSE_BLUE_NOISE.txt)) | | `assets/sbs/resources/shuf4_64_32.exr` | 64 × 32 sampling lookup, contributor-supplied EXR | Lukas Hosek and Alexander Wilkie | [Skylight Modelling](https://cgg.mff.cuni.cz/projects/SkylightModelling/); contributor-supplied provenance | BSD-3-Clause ([license](assets/sbs/resources/LICENSE_HOSEK_WILKIE.txt)) | diff --git a/docs/architecture.md b/docs/architecture.md index 5f7edd08..1bfd16e6 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -128,8 +128,9 @@ face for native and web builds. Font binaries stay in craft-fonts. Set `CRAFT_FO for releases to fail on an unavailable fallback. Without the optional input, builds still work; a missing font produces a repairable resource and a load warning. A checkout with the Latin catalog is required (for example craft-fonts revision `c1db6d1a8ed772191241c3d185e2104be84d8691`). -All bundled `.sbs` packages, including nested materials, are original clean-room recreations -covered together in [ATTRIBUTION.md](../ATTRIBUTION.md); their other resources retain separate credits. +The [asset attribution](../ATTRIBUTION.md) credits the bundled `.sbs` packages, including nested +materials, to the ArtCraft Team and the MaterialCraft contributors. It records the maintainer's +authorship confirmation for the collection and credits the accompanying resources separately. Bitmap/SVG references into another package import only the requested resource declarations, resolving asset paths beside that owner. These become local resource snapshots with distinct names on collisions; saving retains shared asset links inside the library or carries their bytes diff --git a/docs/file-format-parity.md b/docs/file-format-parity.md index 89cedd94..0a79e220 100644 --- a/docs/file-format-parity.md +++ b/docs/file-format-parity.md @@ -10,10 +10,15 @@ The native SBS and primitive-library limitations in [atomic-workflow.md](atomic- > **Last reviewed:** 2026-11-04 · **Last updated:** 2026-11-04 · **Change:** major (SBS is the main project format) · **Target:** the professional node-based material workflow -SBS packages are MaterialCraft's main project format (issue #49), read and written with its own -clean-room code from the format's public documentation and sample files. The older `.mcraft` -package is still read and written. MaterialCraft also reads and writes the open image formats -material artists exchange. +SBS packages are MaterialCraft's main project format (issue #49). Its clean-room Rust codec +reads and writes them. The older `.mcraft` package is still read and written. MaterialCraft +also reads and writes the open image formats material artists exchange. + +The atomic sample builds a height image and a scalar brightness output from a graph defined +in Rust. Its round-trip test saves and reopens the generated graph, checks image errors below +`1e-5` and compares typed values for equality. [Graph generator](../crates/engine/src/atomic_sample.rs) · [Round-trip test](../crates/engine/tests/it/atomics.rs) + +The published sample can be used and modified under either of its project licenses. [Sample file](../examples/atomic_sample.sbs) · [Attribution](../ATTRIBUTION.md) · [MIT](../LICENSE-MIT) · [Apache-2.0](../LICENSE-APACHE) | Format | Read | Write | Fidelity | Tests | |---|---|---|---|---| diff --git a/docs/parity-fixes.md b/docs/parity-fixes.md index 79137549..62f769ee 100644 --- a/docs/parity-fixes.md +++ b/docs/parity-fixes.md @@ -1,8 +1,16 @@ # MaterialCraft parity fixes -Rolling record of fixes made while working through the [SBS root-node inventory](sbs-root-nodes.md). -Parity means exact pixel or typed-value agreement for recorded cases; pending validation is stated explicitly. -The first pass classifies all 546 roots: 166 Parity and 380 Too hard. These measured cases do not establish complete functional parity. +This record follows the [SBS root-node inventory](sbs-root-nodes.md). The first pass classified 166 of 546 roots as Parity and 380 as Too hard. The inventory gives the current status of each root. + +## Comparison method and provenance + +MaterialCraft's clean-room evaluator is written independently in Rust. The directional-noise comparisons use configured SBS graphs and original procedural test patterns. Each application renders the specified graph, size, seed, parameters and output format. For bitmaps, a pixel counts as exact when its raw channel values match at the reported precision. Maximum error is the largest absolute channel difference, in storage levels for integer formats. Value graphs are compared at their declared type. The tables identify original renders, saved-file reopens and processor counts where those differ. + +An intermediate image is a graph node's output. Some tests expose that node as an additional graph output. An instrumented MaterialCraft build can record individual additions, cache hits and work counts in its own evaluator. The reported reference values come from rendered outputs or the exposed properties named in the test. The draw-order tests compare candidate addition sequences with marker pixels from repeated renders. Several sequences can produce the same stored value. The [paired-square regression](../crates/nodes/src/pattern/tests/paired_batches.rs) constructs the pattern graph and generates its input image in Rust. + +The project records the source and license of bundled graphs and resources in its [asset attribution](../ATTRIBUTION.md). + +## Initial fixes - **2026-11-13 — SBS swizzle defaults (orientation corrected):** Removed the importer's zero-channel overrides for omitted two-, three-, and four-component float/integer swizzle settings. Imports now use the existing identity-channel defaults from the function catalog. The first affected node, `3d_gradient.sbs/3d_linear_gradient`, previously repeated X instead of preserving XYZ, producing a horizontal gradient instead of the reference diagonal gradient. Compared both point-position modes with generated position maps at 256 and 512 pixels. Remaining float differences are recorded below; full node parity is not claimed. - **2026-11-13 — Filtered function sampling (integer probes exact):** Added cooked-image storage precision to function samplers. Bilinear reads use eight fractional bits for filter weights. Normalized integer textures return 16-bit filtered values (including 8-bit sources); floating-point textures retain floating-point values. Input bridges retain the integer/floating-point distinction, and cache keys include it. Direct reference measurements on a generated position ramp showed a 16-bit half-step rounding to the next integer, explaining the remaining UV-gradient offset after the swizzle fix. All six measured integer-source sampler cases match all 65,536 float pixels exactly. Two of three floating-source cases are exact; one differs by 5.96e-8. Full-gradient rounding differences remain below. @@ -166,7 +174,7 @@ Connect the third pattern directly to the output, keeping its graph settings, an Keep one emitted tree and follow quadrant slots 1, 0, 1 to the next fork. All four child subtrees measured individually match 1,024/1,024. All sixteen grandchildren also match individually, **16,384/16,384**. With two child slots connected, the six pairs together give **6,137/6,144 · 3.7252903e-09**. With three connected, the four combinations give **4,089/4,096 · 7.4505806e-09**. Both processor counts give these results. -Replaying each child’s measured contributions as a contiguous group fails to reproduce the reference in four of six pairs and three of four triples, even after trying every child order. The same individual stamp contributions, grouped one level deeper, admit six possible relative orders that reproduce all 16 affected positions in every pair. These settings narrow the draw-order discrepancy. Directional Noise 3 remains in progress. +Replaying each child’s measured contributions as a contiguous group fails to reproduce the reference in four of six pairs and three of four triples, even after trying every child order. Grouping the individual MaterialCraft stamp contributions one level deeper gives six candidate orders that each reproduce all 16 affected positions in every pair. These settings narrow the draw-order discrepancy. Directional Noise 3 remains in progress. ### All sixty settings in Directional Noise 3 v2 @@ -543,7 +551,7 @@ Both reference processor counts give these 16² results. At 32², seed 103834 em Save the two-child Directional Noise 2 control with each size, seed, F32 storage and parameter set in its own file. The local reopens reproduce all 1,280 original pixels. Both reference worker counts give 253/256 at 16², maximum 3.7252903e-09, and 1,016/1,024 at 32², maximum 7.4505806e-09. The same three 16² words differ after reopening. [Two-child control and reference words](#additive-wave-overlaps-in-directional-noise-2) -At 16², record each nonzero contribution to the three differing local pixels. Sampling the wrapped depth-one wave produces the first three values at each position. These copies share center, size, rotation and tint. The remaining draws are at the indicated quadrant depth. Each entry below is an F32 word in accumulation order. The instrumented evaluator and release `fdd01fb` gave identical F32 buffers across eleven whole controls. +At 16², record each nonzero contribution to the three differing local pixels. Sampling the wrapped depth-one wave produces the first three values at each position. These copies share center, size, rotation and tint. The remaining draws are at the indicated quadrant depth. Each entry below is an F32 word in accumulation order. The instrumented MaterialCraft evaluator and its release `fdd01fb` gave identical F32 buffers across eleven whole controls. | Pixel | Three depth-one contributions | Later depth | Later contributions | |---|---|---:|---| @@ -1552,7 +1560,7 @@ At that revision, the 32² one-tile color generator test with pattern 2, the inp ### Compile-time conditions before a shared pattern draw -A quadrant can use the same random value in an optional assignment and in a later calculation. With a compile-time condition, the discarded arm consumes no draws. If the condition reads an exposed variable, the reference can schedule the shared value while it evaluates the assignment. An unwired argument of a called function behaves as a constant in this comparison. MaterialCraft now keeps this distinction when compiling pattern branches. +A quadrant can use the same random value in an optional assignment and in a later calculation. With a compile-time condition, the discarded arm consumes no draws. In the test below, a condition that reads an exposed variable yields different pixels even when it selects the same arm as a constant condition. An unwired argument of a called function behaves as a constant in this comparison. MaterialCraft now keeps this distinction when compiling pattern branches. Use a full-coverage additive square over black at 16² F32. Give its opacity function three separate Random(1) nodes A, T and E. Form L = A + (inner ? T : .3125). In the first input of a Sequence, store S = outer ? L : .1875. In the second, return (E × .5 + L × .25) + S × .125. Render both inner switch values at seeds 0, 113 and 137. Keep the pattern seed offset at its default. For the direct and called forms of T use Random(1) and a zero-argument function returning that draw. For the packed form, pack A and the inner result as Float2, then sum X and Y. @@ -1729,7 +1737,7 @@ In the independent seed-113 setting both roots differ at the same 21 of 1,024 pi To read the geometry, retain the Iterate and Switch graph, the original count expressions and every assignment of the quadrant opacity function. Reset a scalar draw counter before the outer count. After evaluating opacity, increment the counter and use the requested published scalar as the opacity of an additive square of size (.025,.025). Place successive squares at distinct pixel centers starting at (0,0) in a black, untiled 32² F32 field. The independent control has 12 draws and the one-ring, one-pattern control has one. In the latter, the initial angle 3.103569269 and initial radius .331919193 match. MaterialCraft then publishes radius .277020574 and rotation .457172245, where the reference gives .281947523 and .538937986. Pattern size and tint match. -For a separate stream control, replace the quadrant expression with 24 consecutive assignments of Random(1) and read each assigned value. The two seeds 113 and 137 match 49,152/49,152 F32 pixels on both processor counts and on reopen, maximum zero. At seed 113 the second, sixth and seventh samples are .858505130, .288028121 and .560580373. With only radius variation enabled, MaterialCraft uses sample seven and the reference uses sample two. With only rotation variation enabled, MaterialCraft uses sample six and the reference uses sample seven. These indices reproduce every observed scalar word at seeds 0, 113, 137, 12071 and 68119. For radius use `r + (r * (r * u) − r) * .15` with r = .35 and unit draw u. For rotation use the starting angle of three quarters of a turn, interpolate in radians toward `2πu − π` by .3, then divide by 2π. Round each operation to F32. Both roots remain in progress. +For a separate stream control, replace the quadrant expression with 24 consecutive assignments of Random(1) and read each assigned value. The two seeds 113 and 137 match 49,152/49,152 F32 pixels on both processor counts and on reopen, maximum zero. At seed 113 the second, sixth and seventh samples are .858505130, .288028121 and .560580373. With only radius variation enabled, MaterialCraft uses sample seven. Sample two reproduces the recorded radius. With only rotation variation enabled, MaterialCraft uses sample six. Sample seven reproduces the recorded rotation. These indices reproduce every observed scalar word at seeds 0, 113, 137, 12071 and 68119. For radius use `r + (r * (r * u) − r) * .15` with r = .35 and unit draw u. For rotation use the starting angle of three quarters of a turn, interpolate in radians toward `2πu − π` by .3, then divide by 2π. Round each operation to F32. Both roots remain in progress. ### Pattern Fibers 1 at default and changed tiling @@ -1802,7 +1810,7 @@ For a direct arithmetic replay, interpret each word below as an IEEE binary32 ad | (33, 41) | `b8f3de8b b9254daf 39801678 bc578327 bbf6df9d bb108f40 babee2ea bb91c340 bbbb5b83 3c02e67b 3b026ca1` | | (46, 33) | `bc24af84 bb2e0f62 bc92ce6d bb977f92 3d185f5f 3cc996f0 3a2f311a 3b930c49 3c9319d8 ba1fdcfe bb553cf7` | -With the stored background and eleven addends held fixed, 30,987,036 of 39,916,800 permutations give the reference word at (9, 9). At each of the other two pixels, 19,958,400 permutations give each of the two possible words. These results establish that addition order suffices to reproduce the three differences. The execution order of the full reference tree remains unresolved. +In a local arithmetic replay with the stored background and eleven addends held fixed, 30,987,036 of 39,916,800 permutations give the reference word at (9, 9). At each of the other two pixels, 19,958,400 permutations give each of the two possible words. These results establish that addition order suffices to reproduce the three differences. The execution order of the full reference tree remains unresolved. Keep the complete source graph and change just the outer Iterate count on its final FX-Map. Evaluate its original count first in a Sequence, then return zero, one or two. Use the [four established sizes, settings and seeds](#seeded-quadrant-properties-with-a-live-tint-multiplier) in F32. At zero repeats all **23,552/23,552** background pixels match on both processor counts and after saving, maximum zero. The local ordinary save reproduces the original at every count and size. @@ -2070,7 +2078,7 @@ Set the FX-Map itself to F32 to read the sum before U16 conversion. At 32 × 32 Three drawing quadrants use the same branch offset and tint at successive depths. For grayscale analytic shapes whose only computed drawing properties are a branch offset and an optional tint, the evaluator can reuse their values by seed when both expressions are independent of position, depth, iteration and writable variables. The stamp uses the current depth and extent on every visit. An invisible parent of terminal draws can consume one previous skipped evaluation and one unit from the bounded cache allowance. Its children still run in their original order. -The 128 × 32 U16 control visits 12,583,070 nodes. In an instrumented run with room to finish, using separate node and depth keys required 9,038,245 full property evaluations. Starting reuse before the first filled batch and sharing equivalent branch expressions gave 8,122,984 hits and 4,460,086 full evaluations. Both complete buffers have the same raw hash. The latter fits within the existing 5,242,880 full-evaluation limit. A version that kept separate keys for each node and depth still reached that limit. +The 128 × 32 U16 control visits 12,583,070 nodes. In a diagnostic MaterialCraft build with room to finish, using separate node and depth keys required 9,038,245 full property evaluations. Starting reuse before the first filled batch and sharing equivalent branch expressions gave 8,122,984 hits and 4,460,086 full evaluations. Both complete buffers have the same raw hash. The latter fits within the existing 5,242,880 full-evaluation limit. A version that kept separate keys for each node and depth still reached that limit. A normal save gives the three expressions fresh function-node IDs. In a control made from that save, point the three quadrants to the same parameter data record. Keep every expression and connection. The intermediate renderer that keyed on the original IDs now produces the original U16 hash and matches 4,095/4,096 · 3 on one processor. The corrected renderer compares function wiring with relative node IDs for its cache key. Its regression also distinguishes a subtraction whose operands are exchanged. @@ -2330,7 +2338,7 @@ Render the complete Noise Dirt 1 v2 graph at those same settings. Compare the ch | 128 × 256 · 433678 · U16 | 32,766/32,768 · 1 | 32,762/32,768 · 1 | 32,762/32,768 · 1 | | 128 × 256 · 433678 · F32 | 28,180/32,768 · 2.38418579e-07 | 28,746/32,768 · 1.1920929e-07 | 27,949/32,768 · 2.38418579e-07 | -At 16 × 32 and seed 299367, the earlier catalog measurement was 495/512 · 1.1920929e-07. The current release matches 512/512 F32 pixels on one processor. The 128 × 256 F32 image still differs while all three iteration counts agree. At the earlier [32 × 16 blocked setting](#streaming-deep-quadrants-that-draw-the-same-connected-image), the complete release graph still reaches its execution guard. The reduced depth-seven readout gives 131,072 / 90,211 / 90,211. Both reference worker counts and the ordinary save match 512/512 pixels with maximum zero. The 311,494 parents have 21 drawing quadrants each, requiring 6,541,374 draws. An instrumented run reaches its 5,242,880 full property evaluations at depth seven. At that point it has 909,311 traversal credits, 2,870 retained draws and zero property-cache hits. Both discrepancies remain open. +At 16 × 32 and seed 299367, the earlier catalog measurement was 495/512 · 1.1920929e-07. The current release matches 512/512 F32 pixels on one processor. The 128 × 256 F32 image still differs while all three iteration counts agree. At the earlier [32 × 16 blocked setting](#streaming-deep-quadrants-that-draw-the-same-connected-image), the complete release graph still reaches its execution guard. The reduced depth-seven readout gives 131,072 / 90,211 / 90,211. Both reference worker counts and the ordinary save match 512/512 pixels with maximum zero. The 311,494 parents have 21 drawing quadrants each, requiring 6,541,374 draws. The instrumented MaterialCraft evaluator reaches its 5,242,880 full property evaluations at depth seven. At that point it has 909,311 traversal credits, 2,870 retained draws and zero property-cache hits. Both discrepancies remain open. For a separate Noise Dirt 1 repeat at 64 × 32, seed 649541 and disorder .8125, the [first two captures](#the-receiving-half-of-a-quadrant-in-two-tiled-trees) agreed at 1,991 locations. Three further one-processor reads match 2,048, 2,047 and 2,044 of 2,048 pixels. Across the one- and eight-processor reads and the save, all 1,965 invariant pixels match. Each local pixel appears in at least one read. At 32 × 16 and 128 × 64, respectively, one and 25 local pixels still differ from every reference read. @@ -4835,7 +4843,7 @@ Construct a grayscale FX-Map with a .0625 background, zero roughness, overall op The production cook matched 7,159/7,168 desktop pixels in 28 completed settings. The reference produced a buffer for all 32. Save and reopen the depth-eight regular, depth-eleven regular, depth-ten returning and depth-ten narrow graphs. Repeat the F32 and U16 rectangles. The two applications matched 766/768 pixels in six completed reopens, maximum 5.96046448e−8. Across all eight, the reference reproduced 1,008/1,024 original pixels. Its 16 changed pixels were in the depth-eleven F32 image, maximum 2.98023224e−8. -For the whole BNW Spots 3 v2 graph use 32² F32, seed 162174, scale 2, disorder .78125, speed 1.015625, anisotropy .390625, angle .40625 and tile offset (.1708984375,−.29296875). Complete this traversal and the two F32 square controls below in an instrumented cook with a higher visit allowance. On each saved graph select one or eight reference workers explicitly and render twice without changing the seed. The table gives exact pixels / total and maximum channel error. +For the whole BNW Spots 3 v2 graph use 32² F32, seed 162174, scale 2, disorder .78125, speed 1.015625, anisotropy .390625, angle .40625 and tile offset (.1708984375,−.29296875). Complete this traversal and the two F32 square controls below in a diagnostic MaterialCraft build with a higher visit allowance. On each saved graph select one or eight reference workers explicitly and render twice without changing the seed. The table gives exact pixels / total and maximum channel error. | Graph | Completed traversal vs one worker, both runs | vs desktop | vs eight workers, first run | vs eight workers, second run | Eight-worker repeat | |---|---:|---:|---:|---:|---:| @@ -5765,7 +5773,7 @@ Across the three disconnected-background reopens, 39,684 of 40,960 F32 pixels ma ### Eight-level two-child drawing across equal tile and render windows -A complete eight-level additive pattern can draw a parent followed by two leaves at each of its 16,384 terminal branches. The one-processor reference uses batches of 5,460 physical tile copies even when the render and tiling windows extend beyond the unit square. MaterialCraft now counts each stamp using the actual common window when both axes wrap. This changes how overlapping F32 contributions accumulate. The measured path requires a single emitted tree and the existing checks on shape, opacity, subdivisions and batch boundaries. [Two-child batch construction](../crates/nodes/src/pattern/tile_runs/two_children.rs) +A complete eight-level additive pattern can draw a parent followed by two leaves at each of its 16,384 terminal branches. The measured single-processor pixels agree with MaterialCraft's batch size of 5,460 physical tile copies when the render and tiling windows extend beyond the unit square. MaterialCraft now counts each stamp using the actual common window when both axes wrap. This changes how overlapping F32 contributions accumulate. The measured path requires a single emitted tree and the existing checks on shape, opacity, subdivisions and batch boundaries. [Two-child batch construction](../crates/nodes/src/pattern/tile_runs/two_children.rs) For the regression, start with a white grayscale F32 field. Place additive squares on all depth-seven parents and on their two leaves in slots 0 and 2. Superimpose the parent squares from second-level groups 0 and 5, assigning gains 2⁻²⁵ and −1 respectively. Keep all remaining draws active at gain .25. Use seed 158729, leaf width and height .875 in local coordinates, and leaf Y offset .5. Number the parents in a 32² readout in recursive child order. For each texel, interleave its five column and row bits, starting with the low column bit. [Regression geometry and readout](../crates/nodes/src/pattern/tests.rs) @@ -6223,7 +6231,7 @@ For wider coverage, use shape selectors 2, 3, 4 and 6 with tiling off, horizonta The 128 full F32 frames matched 2,359,296/2,359,296 pixels. In the square graph repeat all four tiling modes with group pairs (9,11), (7,9), (5,11) and (5,7), moving the grandchild just over each seam in turn as in the regression. These 32 frames matched 524,288/524,288. Save and reopen rows 0, 3 and 6 for horizontal squares, both-axis shape 3 and untiled shape 6. Repeat with square edge settings 0, 3 and 6 under vertical tiling, visiting X then Y for each pair in the given order. Both applications preserved their originals and agreed on all 172,032/172,032 pixels across these 12 reopens. All maxima are zero. -Test the copy threshold independently with square size .875, horizontal tiling and 128² F32. Leave the parent pairs overlapped. Each depth-three subtree has 5,376 draws. Move 0, 40, 80 or 83 grandchild squares to cross the left edge, dividing the extra copies equally among the four depth-four children and assigning remainders to the first children in Morton order. Use pairing rounds 0, 5, 17, 28, 41 and 62 in both polarities. All 48 frames match, 786,432/786,432 pixels with maximum zero. At 84 extra copies, a subtree fills a batch of 5,460 and the reference order can change. The three-level tiled implementation uses the measured order below that threshold when its splits remain in the measured subtree intervals. +Test the copy threshold independently with square size .875, horizontal tiling and 128² F32. Leave the parent pairs overlapped. Each depth-three subtree has 5,376 draws. Move 0, 40, 80 or 83 grandchild squares to cross the left edge, dividing the extra copies equally among the four depth-four children and assigning remainders to the first children in Morton order. Use pairing rounds 0, 5, 17, 28, 41 and 62 in both polarities. All 48 frames match, 786,432/786,432 pixels with maximum zero. At 84 extra copies, a subtree fills a batch of 5,460 in MaterialCraft. At that threshold the marker pixels can indicate a different relative order. The three-level tiled implementation uses the measured order below that threshold when its splits remain in the measured subtree intervals. For the real generators, route the pattern node directly to the output. Request F32 at 256² seed 0, 128 × 64 seed 142327 and 256 × 128 seed 142453. Add 32², 32 × 64, 64 × 128, 128 × 64, 128² and 256 × 128 with seed 186377 + i + 71j, where i is the inventory index and j starts at zero. Dirt 5 matched all 175,104 pixels with tiling off and all 175,104 with both axes enabled. Dirt Gradient also matched 175,104/175,104 untiled, all maxima zero. With its original horizontal tiling it matched 60,028/175,104, maximum 1.19209290e−7. With both axes enabled it matched 42,464/175,104, maximum 1.34110451e−7. @@ -6453,9 +6461,9 @@ The shared two-child draw path retained 1,792,256/1,792,256 pixels in the 97 one ### Eight full subtree pairs in Dirt Gradient -When all eight adjacent pairs of depth-three subtrees in the final quadrant reach 10,920 physical tile copies, the generator draws their parents and descendants in a different order. A batch holds 5,460 copies. The clean-room renderer now applies the measured order when its cuts stay in the measured subtree intervals. The regression distinguishes a late continuation inside group 60. +In this Dirt Gradient fixture, MaterialCraft counts 10,920 physical tile copies in each of eight adjacent pairs of depth-three subtrees in the final quadrant. The recorded pixels agree with a different ordering of the parent and descendant draws. MaterialCraft groups 5,460 copies per batch and applies that ordering when its cuts stay in the measured subtree intervals. The regression distinguishes a late continuation inside group 60. -Start with a full four-child tree and additive squares at depths seven, eight and nine. Number stamps in depth-first order from zero. Each depth-seven parent and its descendants contribute 21 stamps. In every depth-four subtree move 24 depth-nine squares to the left seam. Select the first 24 cells in row-major order within its 32² depth-nine grid. This adds 96 copies per depth-three group. Use a 128² F32 white canvas and compare pairs of depth-seven markers at shared centers with gains −1 and 2⁻²⁵. The 73 frames gave 57,275 order readings, including all 32,766 adjacent comparisons in both gain assignments. The 16,384 parents fell into 59 runs. Individual stamp comparisons resolved 20 cuts inside parent groups. Two further sets of 2,066 comparisons placed stamps 327924 and 327935 after the 14,051st parent, between stamps 306306 and 330624. Eleven adjacent comparisons put the intervening stamps in ascending order. These last 12 stamps of group 60 form a separate run. [Single-pair probes and stamp coordinates](#individual-tile-copies-after-two-full-horizontal-batches) +Start with a full four-child tree and additive squares at depths seven, eight and nine. Number stamps in depth-first order from zero. Each depth-seven parent and its descendants contribute 21 stamps. In every depth-four subtree move 24 depth-nine squares to the left seam. Select the first 24 cells in row-major order within its 32² depth-nine grid. This adds 96 copies per depth-three group. Use a 128² F32 white canvas and compare pairs of depth-seven markers at shared centers with gains −1 and 2⁻²⁵. The 73 frames gave 57,275 marker readings for stamp pairs, including all 32,766 adjacent comparisons in both gain assignments. For the 16,384 parents, a sequence of 59 runs fits those readings. Comparisons of individual stamps locate 20 cuts inside parent groups in that sequence. Two further sets of 2,066 comparisons placed stamps 327924 and 327935 after the 14,051st parent, between stamps 306306 and 330624. Eleven adjacent comparisons put the intervening stamps in ascending order. These last 12 stamps of group 60 form a separate run. [Single-pair probes and stamp coordinates](#individual-tile-copies-after-two-full-horizontal-batches) For the compact regression, place the extra copies on the first 24 stamps of each 1,344-stamp depth-four subtree in traversal order. Use seed 206407 and the same two gains. Put stamp pairs (327923,88021), (327924,91851), (327925,91651) and (327935,93255) at (16,24), (18,24), (20,24) and (22,24). At x = 24, 26, 28, 30, 32 and 34 on that row, use (344042,259673), (279529,324712), (85920,267859), (42912,267222), (10643,214976) and (10644,91692), respectively. Exchange gains and read the raw F32 image. All 20 marker readings and 32,768/32,768 image pixels match. The regression failed with the previous renderer. [Executable square regression](../crates/nodes/src/pattern/tests/paired_batches.rs) @@ -7418,7 +7426,7 @@ For Clouds 1 and 2 (78 and 79), repeat the differing cases from the [32-setting Use matrix case indices 7, 8 and 9 for Clouds 1, and 1, 6, 7, 8 and 9 for Clouds 2, with case 0 as the control. In Clouds 2 every one of the 12 initially differing stored values recurred as an exact match at least once. In Clouds 1 this happened at 21 of 22. The remaining coordinate was (126,211) in the 128 × 256 U16 case with seed 382396 and disorder .921875. It differed by four levels even in a reference render that matched all the other 32,767 pixels. -To isolate that case, observe the three pattern generators in the original graph. The smaller generators match 8,192/8,192 and 2,048/2,048 U16 texels. In the full-size generator feeding the transform and the opacity mask, two texels differ by one level each on the instrumented render. Bind its MaterialCraft U16 output as the original graph's input at that node. Leave the two smaller generators running and change only the two listed texels. The following rows compare with the original reference outputs. +To isolate that case, observe the three pattern generators in the original graph. The smaller generators match 8,192/8,192 and 2,048/2,048 U16 texels. In the full-size generator feeding the transform and the opacity mask, two texels differ by one level each in the render that records the three generator outputs. Bind its MaterialCraft U16 output as the original graph's input at that node. Leave the two smaller generators running and change only the two listed texels. The following rows compare with the original reference outputs. | U16 level at (35,174) | U16 level at (126,211) | U16 exact / total · max | F32 exact / total · max | |---:|---:|---:|---:| @@ -9392,7 +9400,7 @@ In the spot generator’s [32², scale-two case](#moisture-spot-and-cell-fields- Use the [original paired-square tree](#untiled-draw-order-for-two-and-four-children-below-depth-seven), with 64 subtrees, 256 depth-seven parents per subtree and two depth-eight children per parent. Enable both tiling axes in the unit window. Each parent draws an interior square with gain −1 or 2⁻²⁵ on a white F32 background. Align pairs of subtrees in 32 separate areas of the upper half of the image. Draw the children lower down with gain .25. Use a child width of 2.25 and height .875 in its own cell. Place both children on the horizontal seam for parents with index modulo 16 equal to zero, zero or one, or seven in three separate graphs. Center the other children horizontally. Render all 63 pairing rounds at 256² with seed 137143 + 17r for zero-based round r. -The reference changes the parent ordering at indices 211, 144 and 212 respectively within a divided subtree. Each graph has two parent ranges. Displacing the competing interior squares by opposing one-cell offsets distinguished 8,064 cross-subtree relations per graph. All three give the same sequence of 29 contiguous draw ranges when their split points are expressed in physical tile copies. Splits occur every 5,460 copies drawn in composite order. The first three divided prefixes may finish in either of the last two subtrees before their continuations end. Later cuts can change the order of entire subtrees. MaterialCraft checks those boundaries before using either measured sequence. +The marker pixels are consistent with a change in parent order at indices 211, 144 and 212 respectively within a divided subtree. Each graph has two parent ranges. Displacing the competing interior squares by opposing one-cell offsets distinguished 8,064 cross-subtree relations per graph. One sequence of 29 contiguous draw ranges fits all three graphs when the splits are expressed in physical tile copies. In this sequence, splits occur every 5,460 copies drawn in composite order. The first three divided prefixes may finish in either of the last two subtrees before their continuations end. Later cuts can change the order of entire subtrees. MaterialCraft checks those boundaries before using either measured sequence. Six separately constructed graphs varied which parents put children on the seam. Use every 32nd parent, every 64th, every 16th in even subtrees, every 32nd shifted by three times the subtree index, every 16th except every 64th in subtrees 16–23, or every 16th in the first two of every four subtrees and every 32nd in the other two. Each selected sequence predicted 516,096/516,096 same-parent pair comparisons, maximum zero. The 26-range sequence applied to the every-64th case. A separate set used every 16th parent at the seam. Test each of the six two-slot combinations, then cycle through all six across the 64 subtrees. For rounds 3, 11, 24, 35, 43 and 58 render each gain orientation. In these seven graphs the complete F32 output improved from 4,391,856/5,505,024 to 5,505,024/5,505,024 pixels, maximum zero. @@ -9684,7 +9692,7 @@ At 32² F32, seed 113, scale 2 and disorder .37, the first BnW Spots 3 and first ### Bounded traversal of deep patterns -Four roots reached the traversal guard even at 4×4. An instrumented release cook raised the visit ceiling from 1,048,576 to 2,097,152 and the raster copy ceiling from 1,048,576 to 8,388,608 for this experiment. The 256,000,000-pixel-work guard remained active. Use defaults, F32, and seeds 106622, 106635, 106765 and 106778 in table order. Each process cooked one graph on one worker. Peak resident memory includes graph loading. The visit and stamp counts are for the most expensive pattern stage. Times are single observations. +Four roots reached the traversal guard even at 4×4. A diagnostic MaterialCraft release build raised its visit ceiling from 1,048,576 to 2,097,152 and the raster copy ceiling from 1,048,576 to 8,388,608 for this experiment. The 256,000,000-pixel-work guard remained active. Use defaults, F32, and seeds 106622, 106635, 106765 and 106778 in table order. Each process cooked one graph on one worker. Peak resident memory includes graph loading. The visit and stamp counts are for the most expensive pattern stage. Times are single observations. | Package | Whole pixels exact | Maximum F32 error | Visits / emitted stamps | Cook seconds | Peak MiB | First differing stage | |---|---:|---:|---:|---:|---:|---| @@ -9998,7 +10006,7 @@ For independent field set m=0…6 use dimensions 16², 32×16, 16×32, 32², 64 Set 0 uses defaults. For sets 1…6 choose shape types 11, 1, 4, 7, 11 and 2. Set X and Y counts to 2+(m mod 4) and 4−(m mod 3), amount to 7+m, distribution mode and output normal format to m mod 2, nonsquare expansion to m mod 3 = 1, and extrusion height to .40625+.125m with symmetry on for even sets. Enable displacement when m is divisible by three. Turn around the normal by (m−3)×.109375, set the pivot to (.09375(m−2),−.109375m,.03125), background opacity to .0625m, atlas grid to (2+(m mod 3),2), and pattern input count to 1+(m mod 3). -The reference reopened a MaterialCraft-saved graph using the same public math calls. Its ten reference outputs reproduce all 11,520 original reference pixels bit for bit. On the seventh field set, changing only the shape type to 2 reproduces the full discrepancy, 339/2,048 F32 pixels exact. In 31 single-setting and shape/displacement controls, 18 shape-2 outputs each match 339/2,048 and the other 13 each match 2,048/2,048. Sampling, the active predicate, ray distance and atlas position each match 6,656/6,656 pixels across four instrumented cases. The cube normal and the subsequent stored normal each match 970/6,656. The value before encoding matches 4,947/6,656 and differs only on shape 2. The whole root remains in progress. +The reference reopened a MaterialCraft-saved graph using the same public math calls. Its ten reference outputs reproduce all 11,520 original reference pixels bit for bit. On the seventh field set, changing only the shape type to 2 reproduces the full discrepancy, 339/2,048 F32 pixels exact. In 31 single-setting and shape/displacement controls, 18 shape-2 outputs each match 339/2,048 and the other 13 each match 2,048/2,048. Sampling, the active predicate, ray distance and atlas position each match 6,656/6,656 pixels in four cases that record those intermediate graph outputs. The cube normal and the subsequent stored normal each match 970/6,656. The value before encoding matches 4,947/6,656 and differs only on shape 2. The whole root remains in progress. ### Connectable numeric arguments in saved function graphs @@ -10231,7 +10239,7 @@ Each series requests six frames from the original graph with identical settings. | 512×128, seed 18917, width 70.65625, height 153.71875, disorder .28125 | U16 | 65,524/65,536 · 5 | 6 | 24 · 6 | 2 · 5 | | Same rectangular setting | F32 | 65,522/65,536 · .0000780820847 | 6 | 22 · .0000780820847 | 0 · 0 | -In the twelve earlier instrumented cases, the generator feeding the blend source matched 46,336/46,336 pixels. The generator feeding the destination and the blend each matched 46,334/46,336, maximum one U16 level. The independently requested final images matched 46,335/46,336, maximum .0000780224800 F32. The differing positions can change between requests for intermediate and final images. The stable 128² U16 discrepancy remains open. [Twelve stage settings](#scratches-messy-fibers-microscope-and-moisture) +In the twelve earlier cases with intermediate graph outputs recorded, the generator feeding the blend source matched 46,336/46,336 pixels. The generator feeding the destination and the blend each matched 46,334/46,336, maximum one U16 level. The independently requested final images matched 46,335/46,336, maximum .0000780224800 F32. The differing positions can change between requests for intermediate and final images. The stable 128² U16 discrepancy remains open. [Twelve stage settings](#scratches-messy-fibers-microscope-and-moisture) ### Precision of two dense noise generators in custom regions @@ -10440,7 +10448,7 @@ Across all inventory settings, both versions now agree on every U8 pixel. The fi ### Short directional blur tap order on rectangular inputs -Fluid matches **25,969,920/25,969,920 final pixels across 121 distinct settings** through 2048 pixels per side. Both applications reopened the MaterialCraft package and reproduced every pixel of their originals over 28, 38 and 36 settings (498,688, 8,654,848 and 17,588,224 pixels). The three instrumented renders at 512×1024, 1024×512 and 1024² match 9,961,472/9,961,472 intermediate and final samples. [First differing stage and earlier settings](#fibers-1-and-fluid-through-1024-pixels-per-side) +Fluid matches **25,969,920/25,969,920 final pixels across 121 distinct settings** through 2048 pixels per side. Both applications reopened the MaterialCraft package and reproduced every pixel of their originals over 28, 38 and 36 settings (498,688, 8,654,848 and 17,588,224 pixels). The three renders with intermediate graph outputs recorded at 512×1024, 1024×512 and 1024² match 9,961,472/9,961,472 intermediate and final samples. [First differing stage and earlier settings](#fibers-1-and-fluid-through-1024-pixels-per-side) | Storage | Distinct settings | Exact pixels | Maximum error | |---|---:|---:|---:| @@ -11566,7 +11574,7 @@ A scan of the reachable pattern nodes in the 546 inventory graphs found 61 roots ### Texture sampling in pattern functions -The Bevel Smooth debug position root matches **354,560/354,560 RGBA pixels in 38 renders**, maximum error zero. This includes 12,288 pixels in each of U8, U16 and F16 and 317,696 in F32. Previously the 22 recorded cases matched 285,715/285,952 and the 16 offset controls matched 68,394/68,608. At 64² on the [position field](#segment-mapping-and-normal-graph-rechecks), the incoming image was exact but the last FX-Map drew a 17-pixel diagonal at x=22…38, y=x+9. Its texture read determined the location and angle. The upstream processor, both FX-Maps and the input and output bridges now match 368,640/368,640 pixels across 18 instrumented renders. +The Bevel Smooth debug position root matches **354,560/354,560 RGBA pixels in 38 renders**, maximum error zero. This includes 12,288 pixels in each of U8, U16 and F16 and 317,696 in F32. Previously the 22 recorded cases matched 285,715/285,952 and the 16 offset controls matched 68,394/68,608. At 64² on the [position field](#segment-mapping-and-normal-graph-rechecks), the incoming image was exact but the last FX-Map drew a 17-pixel diagonal at x=22…38, y=x+9. Its texture read determined the location and angle. The upstream processor, both FX-Maps and the input and output bridges now match 368,640/368,640 pixels across 18 renders comparing those graph outputs. A pattern function wraps both axes when sampling an image, including when output tiling is disabled. A nearest read on an exact negative texel boundary takes the preceding texel. For example, (−.125,−.25) in a 32² image selects (27,23). The [value-function filter](#value-processor-texture-filtering) also applies to pattern reads. Its bilinear fractions retain F32 precision. For a gray read from a color source, filter each channel and then evaluate ((G+B)+R) × float32(1/3). @@ -11603,7 +11611,7 @@ The same change also reaches other unresolved roots. On the independent 32² F32 ### Global blend opacity in Normal to Height -Normal to Height matches **145,664/145,664 stored pixels across 18 renders**. U8 contributes 5,120 pixels in two renders, U16 121,856 in seven, F16 5,120 in two and F32 13,568 in seven. Each format has zero maximum error. The 11 renders instrumented before and after the fix previously matched 3,201/18,688 final pixels. At each of 92 reachable stages whose inputs and output fit within 128², the previous result was 2,181,843/2,796,800. The corrected result is 2,796,800/2,796,800, maximum zero across all 1,012 intermediate images. +Normal to Height matches **145,664/145,664 stored pixels across 18 renders**. U8 contributes 5,120 pixels in two renders, U16 121,856 in seven, F16 5,120 in two and F32 13,568 in seven. Each format has zero maximum error. For the 11 renders with stage outputs recorded before and after the fix, the earlier build matched 3,201/18,688 final pixels. At each of 92 reachable stages whose inputs and output fit within 128², the previous result was 2,181,843/2,796,800. The corrected result is 2,796,800/2,796,800, maximum zero across all 1,012 intermediate images. The two earliest differences were 16² U16 Add Sub blends fed by transforms. Both inputs matched at both stages in all 11 renders. At a computed global opacity of 6.000000476837158, foreground 35,122 and background 32,767 give 37,476. A second foreground of 32,767 gives 32,766. Applying the authored opacity directly gave 61,021 and 32,761. The blend caps global opacity to [0,1] before applying the mask. With the same two inputs and F32 mask values 73/255 and 126/255 the expected levels are 34,115 and 32,767. The measured bound applies to the nine native blend modes, Copy through Divide. It is applied during rendering. Ordinary saves retain the authored opacity expression. @@ -12823,7 +12831,7 @@ The ten directional generators produced **135 comparable whole outputs across 19 | noise_directional_scratches | 19/19 | 119,970/144,640 | 1 / 1 / 0.00048828125 / 2.37524509e-05 | | noise_directional_scratches_v2 | 19/19 | 137,786/144,640 | 1 / 1 / 0.000244140625 / 2.8796494e-05 | -Use the four archived defaults, seed and changed cases, the [four-format sweep and independent seed](#four-format-inventory-comparison), and ten stage-instrumented renders. For the latter, seed j is 100537+13i plus [0,1,2,2,2,2,6,7,8,9], with i = 251 through 260 in table order. Start at 16² F32 with defaults. Use A at 32² F32, B at 32² in U8/U16/F16/F32, C at 64×32 F32, B at 32×64 U16, D at 32² F32 and A at 64×32 F16. +Use the four archived defaults, seed and changed cases, the [four-format sweep and independent seed](#four-format-inventory-comparison), and ten renders with intermediate graph outputs recorded. For the latter, seed j is 100537+13i plus [0,1,2,2,2,2,6,7,8,9], with i = 251 through 260 in table order. Start at 16² F32 with defaults. Use A at 32² F32, B at 32² in U8/U16/F16/F32, C at 64×32 F32, B at 32×64 U16, D at 32² F32 and A at 64×32 F16. | Exposed controls | A | B | C | D | |---|---|---|---|---| @@ -13058,9 +13066,9 @@ The isolated Fibers primitives use Gaussian stamps. Both Fluid primitives use th ### Stored grayscale stops and scalar Levels controls -Three fractal sum roots match **436,992/436,992 output pixels across 54 renders**, maximum error zero. Each root contributes 119,808 U16, 5,120 U8, 5,120 F16 and 15,616 F32 pixels. Use the nine inventory renders and the nine seed, size and parameter profiles recorded with the [box blur measurements](#box-blur-and-signed-pixel-sizes). The comparisons include defaults, changed roughness and opacity, restricted octave ranges and both rectangular orientations. All reachable stage images in the nine instrumented renders per root also match. +Three fractal sum roots match **436,992/436,992 output pixels across 54 renders**, maximum error zero. Each root contributes 119,808 U16, 5,120 U8, 5,120 F16 and 15,616 F32 pixels. Use the nine inventory renders and the nine seed, size and parameter profiles recorded with the [box blur measurements](#box-blur-and-signed-pixel-sizes). The comparisons include defaults, changed roughness and opacity, restricted octave ranges and both rectangular orientations. All images from reachable graph stages matched in the nine renders per root that recorded intermediate outputs. -| Package and root | Exact before / compared | Exact after / compared | Instrumented images | Exact stage pixels | +| Package and root | Exact before / compared | Exact after / compared | Node output images compared | Exact stage pixels | |---|---:|---:|---:|---:| | `fractal_sum_base.sbs/fractal_sum_base` | 142,777/145,664 | 145,664/145,664 | 1,188 | 1,007,841,792 | | `noise_fractal_sum_base.sbs/fractal_sum_base` | 143,104/145,664 | 145,664/145,664 | 1,008 | 1,310,976 | @@ -13102,7 +13110,7 @@ White Noise retained all 229,376 U16 pixels in five earlier renders. Eight more ### Tone curve sampling and saved handles -The `noise_upscale` root matched **142,592/142,592 output pixels across 17 renders**, maximum error zero. The eight instrumented renders also matched all 62,976 pixels across 48 images. Before the change the same root matched 2,687 output pixels, with maximum errors of 15 U8 levels, 3,791 U16 levels, .228057861 F16 and .228064887 F32. The curve is the first differing filter on the independent input. +The `noise_upscale` root matched **142,592/142,592 output pixels across 17 renders**, maximum error zero. In the eight renders with intermediate graph outputs recorded, all 62,976 pixels across 48 images matched. Before the change the same root matched 2,687 output pixels, with maximum errors of 15 U8 levels, 3,791 U16 levels, .228057861 F16 and .228064887 F32. The curve is the first differing filter on the independent input. Use the [nine inventory renders](#four-format-inventory-comparison), then the [eight additional input profiles for the noise blend](#box-blur-and-signed-pixel-sizes) with a single grayscale input, graph defaults and seed 14604 in place of 14578. The 17 renders account for 119,808 U8, 5,120 U16, 5,120 F16 and 12,544 F32 output pixels. On the changed 32² floating case the U8 codes 32 and 128 entering the curve yield .250977516 and −.228034332. The latter measures the narrow descending segment between adjacent anchors. @@ -13508,7 +13516,7 @@ For the last row draw a parent square with size (.375,.5), color (.75,.25,.5,1), The ten new path and caustic renders use the following (output side, input height, seed, format, setting). Use (16,16,4069,F32,default), (32,32,4093,F32,A), four at (64,64,4127,B) in U8/U16/F16/F32 order, (128,128,4159,F32,C), (32,16,4177,F32,A), (32,32,4201,F32,D) and (64,64,4229,F32,B). The four archived controls and five inventory cases are also included. An independent input repeated for stage inspection counts once. [Four-format inventory comparison](#four-format-inventory-comparison) -For Paths Trace use the transformed five-point path for default, A and D and the seven-point path for B and C. The background stores ((37x+41y+7xy+583+61c+5xc) mod 509)/508 in channel c, starting at zero. In settings A/B/C/D enable corner tracing for A and B, vertex tracing for B and C, and set thickness to .75/1.625/2.75/.25. All four instrumented stages match on default, both A renders and D. The six remaining renders first differ in the FX-Map that draws the path. At 64² in U8 the output differs at 18 pixels, including (0,0), (1,0) and (63,0). [Path buffer coordinates](#marked-variable-reads-in-path-and-mipmap-graphs) +For Paths Trace use the transformed five-point path for default, A and D and the seven-point path for B and C. The background stores ((37x+41y+7xy+583+61c+5xc) mod 509)/508 in channel c, starting at zero. In settings A/B/C/D enable corner tracing for A and B, vertex tracing for B and C, and set thickness to .75/1.625/2.75/.25. All four recorded stage outputs match at the default settings, in both A renders and in D. The six remaining renders first differ in the FX-Map that draws the path. At 64² in U8 the output differs at 18 pixels, including (0,0), (1,0) and (63,0). [Path buffer coordinates](#marked-variable-reads-in-path-and-mipmap-graphs) For RT Caustics Base supply height and noise H=((37x+41y+7xy+53j) mod 509)/508 at j=11 and 13. Store the normal field at j=12, using the normal and alpha construction below. For A/B/C/D use photon grid size 1/1/2/0, height scale .0625/.3125/.625/0, height position .125/.75/.375/.5, index of refraction 1.125/1.375/1.625/1, photon size 2/5.5/7.25/3 and jitter 0/.3125/.75/0. Place the light at (.3125,.6875) for A and B and (.75,.25) for C and D. The first differing stage is the photon FX-Map. At 64² in U16 it differs at (1,7) by one level and the final image matches. Across both matrices all 122,880 U8 output pixels match. U16 matches 8,185/8,192, F16 matches 8,181/8,192 and F32 matches 13,531/33,024. [Procedural normal fields](#normal-maps-panoramas-and-primitive-shapes) @@ -13563,7 +13571,7 @@ For the independent stripes use U8 inputs at (side, radius) (32,2.375), (64,3.12 For the code patches, assign k=16⌊y/16⌋+⌊x/16⌋ on a 256² field and store channels (k,k+1,k+67,k+129) modulo 256. The other inputs are 64² row fields or a 32² one-level pulse across four base levels. One row field uses `((31y+7y²+17) mod 128)+32+c`. The other uses `U=((117y+53y²+17) mod 251)`, with channels U, (U+12) mod 256 and the transposes of both. In the pulse field add one to (0,4,45,184) every eighth row. For the U16 inputs, scale each code by 257 and add 29c below code 255. Use the same four radii at .125 turns and seeds 3433–3436 in field order. Store each U8 source in U8, U16 and F32, and each U16 source in U16 and F32. All 299,008 U8 output pixels in this set match. -The 38 instrumented color and grayscale anisotropic renders compare 304 graph images, including the input and output bridges. 2,560,000/2,560,000 pixels match, maximum stored-component error 0. Six other roots with a reachable directional blur retain all 790,528 exact pixels in 52 renders. +The 38 color and grayscale anisotropic renders compare 304 graph images read at intermediate nodes and at the input and output bridges. 2,560,000/2,560,000 pixels match, maximum stored-component error 0. Six other roots with a reachable directional blur retain all 790,528 exact pixels in 52 renders. Four additional large and rectangular-source anisotropic stage captures match 278,528/278,528 pixels in 32 images. Reloading the package for each color or grayscale pair took 506.09 seconds in total. Repeating the same four captures with the open package took 4.14 seconds. All raw readbacks were byte-identical. The graph size, seed, numeric controls, source bindings and output format were restored between captures. diff --git a/docs/sbs-root-nodes.md b/docs/sbs-root-nodes.md index 29aa8717..c18a1082 100644 --- a/docs/sbs-root-nodes.md +++ b/docs/sbs-root-nodes.md @@ -15,8 +15,11 @@ for this inventory. - Input pins are reported for context: image inputs (type `1` or `2`) and value inputs with `isConnectable=1`. Ordinary exposed parameters are not input pins. - Paths retain package folders and exact graph identifiers; each link opens the containing SBS package. Paths are relative to `assets/sbs/`. -This is a structural inventory for MaterialCraft's clean-room implementation. It does not -assert that graphs cook successfully or are independent of bitmap resources. +The inventory describes the structure of the repository's SBS files. A listed root can still +need an external bitmap or fail to render. The project records the maintainer's authorship +statement for the graph library and the individual resource licenses in its [asset attribution](../ATTRIBUTION.md). +Each parity result links to measured outputs for specific cases. The [comparison method](parity-fixes.md#comparison-method-and-provenance) +explains how to read the raw-pixel counts, typed values and local evaluator traces. ## Results diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 570893de..53ede47d 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -43,9 +43,8 @@ automation + tests), weighted by how much of the day each area carries. **Remain | Platforms | 4 | 50% | Windows, macOS, Linux, FreeBSD and web builds compile; browser file I/O; packaging scripts and release workflows | First release run | | **Total** | **100** | **≈ 69%** | | | -Beyond the reference app: every edit is a command available through MCP, the CLI and the app's -control channel (including synthetic mouse and keyboard input), the engine runs headless with the -same results, and everything compiles to WebAssembly. +MaterialCraft exposes every edit as a command through its MCP server, CLI and control channel, +including synthetic mouse and keyboard input. The same engine runs headless and compiles to WebAssembly. ## Method