diff --git a/crates/eval/src/external_image.rs b/crates/eval/src/external_image.rs index e93a4cde..6bfc7553 100644 --- a/crates/eval/src/external_image.rs +++ b/crates/eval/src/external_image.rs @@ -186,8 +186,9 @@ fn dither(image: &Image, maximum: f32, word_to_byte: bool) -> Option { let word = (original * 65535.0).round(); ((word + received * 257.0 + (random - 0.5) * 256.0) / 256.0).floor() } else { - let noise = if maximum == 255.0 { (random * maximum).round() / maximum } else { random }; - ((original + (received + (noise - 0.5)) * unit) * maximum).round() + // The byte writer adds noise in units of 1/256. Diffused error stays in 1/255 units. + let offset = if maximum == 255.0 { received * unit + (random - 0.5) / 256.0 } else { (received + (random - 0.5)) * unit }; + ((original + offset) * maximum).round() } .clamp(0.0, maximum); (stored, original * maximum - stored) @@ -232,3 +233,23 @@ fn diffuse(image: &Image, mut quantize: impl FnMut(f32, f32) -> (f32, f32)) -> O } Image::from_data(image.width(), image.height(), image.kind(), samples, &Limits::default()).ok() } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn odd_float_rasters_keep_exact_byte_levels_and_dither_fractional_levels() { + let level = 128.0 / 255.0; + let flat = Image::filled(256, 3, Kind::Color, [level; 4]); + let out = resize(&flat, (256, 4), Kind::Color, OutputFormat::F32, OutputFormat::U8).unwrap(); + assert!(out.as_image().unwrap().data().iter().all(|&v| v == level)); + + let ramp = Image::generate(256, 3, Kind::Color, |x, _| [(51.0 + x as f32 / 256.0) / 255.0; 4]); + let out = resize(&ramp, (256, 4), Kind::Color, OutputFormat::F32, OutputFormat::U8).unwrap(); + let image = out.as_image().unwrap(); + for (x, y, channel, expected) in [(16, 1, 1, 51), (219, 1, 2, 52), (18, 3, 1, 52), (105, 3, 3, 51)] { + assert_eq!((image.get(x, y, false)[channel] * 255.0).round() as u8, expected); + } + } +} diff --git a/crates/eval/src/node_execution.rs b/crates/eval/src/node_execution.rs index 38ea4dca..bae73aa1 100644 --- a/crates/eval/src/node_execution.rs +++ b/crates/eval/src/node_execution.rs @@ -2,7 +2,7 @@ use crate::{Cache, Cooked, NodeOutput, NodeResult, Options, identifier, now_ms}; use crate::{ cache_key::{graph_tree_hash_with_registry, hash_of, image_key, variable_key}, graph_instance::cook_instance, - parameter::{inspection_parameters, resolve_parameters}, + parameter::{ResolvedParameters, inspection_parameters, resolve_parameters}, prepared_graph::PreparedGraph, value_execution::evaluate_value, }; @@ -167,10 +167,11 @@ pub(crate) fn cook_node( } let seed = base.seed; - let (mut parameters, instance_literals) = match resolve_parameters(package, node, definition, &mut variables, base, &fixed) { - Ok(parameters) => parameters, - Err(error) => return fail(error, 0), - }; + let ResolvedParameters { values: mut parameters, instance_literals, dynamic_blend_opacity } = + match resolve_parameters(package, node, definition, &mut variables, base, &fixed) { + Ok(parameters) => parameters, + Err(error) => return fail(error, 0), + }; if matches!(node.def.as_str(), "blur" | "emboss") { variables.to_mut().insert("$pixelsize".into(), Value::Float2(base.pixel_size)); } @@ -208,6 +209,7 @@ pub(crate) fn cook_node( let key = hash_of(&( &node.def, serde_json::to_string(¶meters).unwrap_or_default(), + dynamic_blend_opacity, ( w, h, @@ -324,12 +326,25 @@ pub(crate) fn cook_node( } else { (definition.cook)(&context) }; + let selected = if node.def == "blend" && !dynamic_blend_opacity { + materialcraft_nodes::atomic::blend_selected_input(&context).and_then(|slot| incoming.get(slot).copied().flatten()) + } else { + None + }; result.map(|images| { images .into_iter() .map(|image| { // Bridges retain their source pixels; filters store their declared precision let image = if matches!(node.def.as_str(), "output" | "dot") { image } else { crate::output_precision::apply(image, base.format) }; + // A Blend that selects a compatible texture retains its available sampling levels. + if let Some((NodeOutput::BaseLevel(source), format)) = selected + && format == base.format + && source.kind() == image.kind() + && (source.width(), source.height()) == (w, h) + { + return NodeOutput::BaseLevel(image); + } NodeOutput::Image(image) }) .collect() diff --git a/crates/eval/src/parameter.rs b/crates/eval/src/parameter.rs index b72556fc..934dc4ac 100644 --- a/crates/eval/src/parameter.rs +++ b/crates/eval/src/parameter.rs @@ -4,6 +4,12 @@ use materialcraft_nodes::function::compile_with_literal_inputs; use materialcraft_nodes::{NodeDefinition, ParameterDescriptor, accepts_scalar_function, clamp_params, resolve_params}; use std::collections::BTreeMap; +pub(crate) struct ResolvedParameters { + pub values: BTreeMap, + pub instance_literals: Vec, + pub dynamic_blend_opacity: bool, +} + pub(crate) fn resolve_parameters( package: &Package, node: &Node, @@ -11,7 +17,7 @@ pub(crate) fn resolve_parameters( variables: &mut std::borrow::Cow<'_, BTreeMap>, base: ResolvedBaseParameters, literal_inputs: &[String], -) -> Result<(BTreeMap, Vec), String> { +) -> Result { let mut parameters = match definition { Some(definition) if node.def != "graph_instance" => resolve_params(definition, &node.params), _ => { @@ -30,6 +36,7 @@ pub(crate) fn resolve_parameters( } let mut dynamic = std::collections::BTreeSet::new(); + let mut dynamic_blend_opacity = false; for (parameter, exposed) in &node.bindings { if node.def == "graph_instance" && !literal_inputs.contains(exposed) { dynamic.insert(parameter); @@ -37,6 +44,9 @@ pub(crate) fn resolve_parameters( if let (Some(value), Some(current)) = (variables.get(exposed), parameters.get(parameter)) && let Some(coerced) = current.coerce_json(&serde_json::to_value(value).unwrap_or_default()) { + if node.def == "blend" && parameter == "opacity" { + dynamic_blend_opacity = !literal_inputs.contains(exposed); + } parameters.insert(parameter.clone(), coerced); } } @@ -54,7 +64,12 @@ pub(crate) fn resolve_parameters( _ => ChannelMode::Opaque, }; let (value, literal) = compile_with_literal_inputs(function, base.seed, literal_inputs) - .and_then(|program| crate::parameter_function::evaluate(&program, expected, variables.to_mut(), base.size, channels, Some(current))) + .and_then(|program| { + if node.def == "blend" && parameter == "opacity" { + dynamic_blend_opacity = program.reads_graph_parameter(variables); + } + crate::parameter_function::evaluate(&program, expected, variables.to_mut(), base.size, channels, Some(current)) + }) .map_err(|error| format!("function of `{parameter}`: {error}"))?; if matches!(channels, ChannelMode::GrayPatternOpacity) { // Keep the result in floating point until blending. JSON and slider limits lose signed infinities. @@ -91,7 +106,7 @@ pub(crate) fn resolve_parameters( } else { Vec::new() }; - Ok((parameters, fixed)) + Ok(ResolvedParameters { values: parameters, instance_literals: fixed, dynamic_blend_opacity }) } pub(crate) fn inspection_parameters(node: &Node, parameters: &mut BTreeMap) { diff --git a/crates/eval/src/tests.rs b/crates/eval/src/tests.rs index 54129719..d7d47276 100644 --- a/crates/eval/src/tests.rs +++ b/crates/eval/src/tests.rs @@ -655,8 +655,7 @@ fn bitmap_half_storage_uses_the_original_integer_channel_depth() { } } -#[test] -fn pattern_mips_of_a_resized_bitmap_preserve_the_measured_impulse() { +fn bitmap_impulse_graph() -> (Graph, NodeId, NodeId) { use materialcraft_core::{OutputFormat, ParameterInheritance, PatternGraph, PatternNodeKind}; let mut graph = Graph::new("Bitmap mip levels"); @@ -674,7 +673,12 @@ fn pattern_mips_of_a_resized_bitmap_preserve_the_measured_impulse() { node.params.insert("roughness".into(), Value::Float(0.0)); node.params.insert("pattern".into(), Value::PatternGraph(Box::new(pattern))); graph.connect(input, "output", stamp, "pattern0").unwrap(); + (graph, input, stamp) +} +#[test] +fn pattern_mips_of_a_resized_bitmap_preserve_the_measured_impulse() { + let (graph, input, stamp) = bitmap_impulse_graph(); let mut package = Package::new("Impulse"); package.graphs.push(graph); let mut options = Options::new(&no_res); @@ -691,6 +695,44 @@ fn pattern_mips_of_a_resized_bitmap_preserve_the_measured_impulse() { } } +#[test] +fn blend_preserves_the_selected_texture_levels_at_matching_precision() { + use materialcraft_core::{FunctionGraph, OutputFormat, ParameterInheritance, ValueType}; + + let (mut graph, input, stamp) = bitmap_impulse_graph(); + let blend = graph.add_node("blend", [0.0; 2]); + graph.connect(input, "output", blend, "foreground").unwrap(); + graph.connect(blend, "output", stamp, "pattern0").unwrap(); + let mut package = Package::new("Selected impulse"); + package.graphs.push(graph); + let mut options = Options::new(&no_res); + options.inputs.insert("input".into(), Image::gray(32, 16, |x, y| f32::from(x == 10 && y == 8))); + options.overrides.insert("coverage".into(), Value::Float(1.0)); + let cache = Mutex::new(Cache::default()); + for (mode, format, bound, expected) in [ + (7, OutputFormat::U16, false, [0, 2048, 12288, 2048, 0]), + (7, OutputFormat::U16, true, [0, 1280, 5632, 1280, 0]), + (0, OutputFormat::U16, false, [0, 2048, 12288, 2048, 0]), + (7, OutputFormat::U8, false, [0, 1285, 5654, 1285, 0]), + (7, OutputFormat::F32, false, [0, 1280, 5632, 1280, 0]), + ] { + let node = package.graphs[0].node_mut(blend).unwrap(); + node.params.insert("mode".into(), Value::Int(mode)); + node.base.format_mode = ParameterInheritance::Absolute; + node.base.format = format; + if bound { + node.functions.insert("opacity".into(), FunctionGraph::input("coverage", ValueType::Float)); + } else { + node.functions.remove("opacity"); + } + let result = cook(&package, 0, &options, &cache); + assert!(result.nodes.values().all(|node| node.error.is_none())); + let image = result.image(stamp, 0).unwrap(); + let levels = [30, 31, 32, 33, 34].map(|y| (image.get_gray(7, y, false) * 65535.0).round() as u16); + assert_eq!(levels, expected); + } +} + #[test] fn bound_float_bitmap_reduces_close_texels_at_the_measured_filter_precision() { let mut graph = Graph::new("Row reduction"); diff --git a/crates/nodes/src/atomic/blend.rs b/crates/nodes/src/atomic/blend.rs index f1fe5dbf..748b389b 100644 --- a/crates/nodes/src/atomic/blend.rs +++ b/crates/nodes/src/atomic/blend.rs @@ -21,11 +21,27 @@ pub(super) fn definition() -> NodeDefinition { .cook(blend) } +/// The texture a fully weighted, unmasked Blend selects before size or depth conversion. +pub fn blend_selected_input(context: &CookContext) -> Option { + let mode = context.i("mode"); + let opacity = context.f("opacity"); + if context.input(2).is_some() || !(0..=8).contains(&mode) { + return None; + } + if opacity <= 0.0 { + Some(1) + } else if opacity >= 1.0 && (mode == 7 || (mode == 0 && context.input(0).is_some_and(Image::is_gray))) { + Some(0) + } else { + None + } +} + fn blend(context: &CookContext) -> CookResult { let (mode, opacity) = (context.i("mode"), context.f("opacity")); // Stored graphs can compute an opacity outside the slider range. Bound it before applying the mask. let opacity = if (0..=8).contains(&mode) { opacity.clamp(0.0, 1.0) } else { opacity }; - let copies_foreground = opacity == 1.0 && context.input(2).is_none() && (mode == 7 || (mode == 0 && context.input(0).is_some_and(Image::is_gray))); + let copies_foreground = blend_selected_input(context) == Some(0); let foreground = resized_input(context, 0, if copies_foreground { InputResize::Copy } else { InputResize::Filter }); let background = resized_input(context, 1, if opacity == 0.0 { InputResize::Copy } else { InputResize::Filter }); let kind = if [&foreground, &background].iter().any(|i| i.as_ref().is_some_and(|i| !i.is_gray())) { Kind::Color } else { Kind::Gray }; diff --git a/crates/nodes/src/atomic/mod.rs b/crates/nodes/src/atomic/mod.rs index ae12940e..9e50ca74 100644 --- a/crates/nodes/src/atomic/mod.rs +++ b/crates/nodes/src/atomic/mod.rs @@ -39,6 +39,7 @@ use direction::direction; pub const ATOMIC: &str = "Atomic nodes"; pub const GRAPH_ITEMS: &str = "Graph items"; +pub use blend::blend_selected_input; pub use levels::levels_fn; pub use normal::height_to_normal; pub use output::output_kind; diff --git a/crates/nodes/src/atomic/uniform.rs b/crates/nodes/src/atomic/uniform.rs index 97cf2984..1c94da7c 100644 --- a/crates/nodes/src/atomic/uniform.rs +++ b/crates/nodes/src/atomic/uniform.rs @@ -1,6 +1,6 @@ use super::ATOMIC; use crate::{CookContext, CookResult, NodeDefinition, node}; -use craft_texture::{Image, Kind, luminance}; +use craft_texture::{Image, Kind}; pub(super) fn definition() -> NodeDefinition { node("uniform", "Uniform color", ATOMIC) @@ -17,8 +17,36 @@ fn uniform(context: &CookContext) -> CookResult { let color = context.v4("color"); Ok(vec![if !context.b("color_mode") { - Image::filled(context.w, context.h, Kind::Gray, [luminance(color); 4]) + Image::filled(context.w, context.h, Kind::Gray, [(color[0] + color[1] + color[2]) / 3.0; 4]) } else { Image::filled(context.w, context.h, Kind::Color, color) }]) } + +#[cfg(test)] +mod tests { + use super::*; + use materialcraft_core::{OutputFormat, Value}; + use std::collections::BTreeMap; + + #[test] + fn grayscale_uniform_averages_the_three_color_channels() { + for (color, expected) in [([0.125, 0.3125, 0.6875, 0.40625], 0.375_f32), ([1.75, -0.875, -0.25, 0.5], 0.20833333)] { + let params = BTreeMap::from([("color".into(), Value::Color(color)), ("color_mode".into(), Value::Bool(false))]); + let context = CookContext { + w: 1, + h: 1, + seed: 0, + tile: true, + format: OutputFormat::F32, + inputs: &[], + input_formats: &[], + params: ¶ms, + resource: &|_| None, + vars: &BTreeMap::new(), + }; + let image = uniform(&context).unwrap().remove(0); + assert_eq!(image.get_gray(0, 0, false).to_bits(), expected.to_bits()); + } + } +} diff --git a/crates/nodes/src/function/program.rs b/crates/nodes/src/function/program.rs index 1ac8d30f..b275d86c 100644 --- a/crates/nodes/src/function/program.rs +++ b/crates/nodes/src/function/program.rs @@ -32,6 +32,15 @@ impl Program { self.instructions.get(self.output).is_some_and(|instruction| instruction.literal) } + /// Whether the property reads a bound graph parameter, even if its final value is constant. + pub fn reads_graph_parameter(&self, variables: &std::collections::BTreeMap) -> bool { + self.instructions.iter().any(|op| { + !op.literal + && op.definition.id.starts_with("get_") + && matches!(&op.value, Some(Value::Text(name)) if !name.starts_with('$') && variables.contains_key(name)) + }) + } + /// Unbound user inputs in a fixed pattern image selector contribute their typed zero. pub(crate) fn uses_fixed_image_slot(&self, variables: &std::collections::BTreeMap) -> bool { self.output_is_literal() diff --git a/docs/parity-fixes.md b/docs/parity-fixes.md index 3e326b94..b34577aa 100644 --- a/docs/parity-fixes.md +++ b/docs/parity-fixes.md @@ -1509,6 +1509,60 @@ Create one original grayscale PNG from the field ((71x+31y+17xy+3k) mod 257)/256 All 160 observed U16 Bitmap buffers agreed between the two reference runs and the filter variants at their respective size. At 64² from the byte input, the first automatic F32 render agreed with bilinear. After the intervening U16 render, repeating F32 changed 238 pixels. The 128 × 32 control used the same source file and was stable. At 32² from the odd input, the first and later F32 results both differed from bilinear, and they also differed from each other. Automatic sampling of embedded bitmaps remains open. +### Selected Blend inputs and odd-sized float backgrounds in tile generators + +Pattern Tile Generator now matches **757,504/757,504** raw grayscale pixels in 221 distinct settings, with maximum error zero in U8, U16, F16 and F32. The 176 settings from the [bitmap-slot comparison](#pattern-draw-order-for-fixed-and-runtime-image-slots) had 1,204 differing pixels. Preserving the sampling levels of a resized image selected by Blend removed 1,198 differences. Correcting float-to-byte dithering in an odd-sized background removed the last six. An additional 45 settings matched all 116,736 pixels. + +An unmasked Switch at full opacity can forward the foreground's available sampling levels. A grayscale Copy also does so. At zero opacity the nine bounded blend modes forward the background's levels. This requires matching dimensions, channel kind and storage depth. Connecting a mask, changing depth, or driving opacity from a bound graph input gives the downstream automatic filter a full mip chain. The reference retained the source levels with a literal-valued opacity function, image-size read, unused seed read and unbound opacity input. Binding the blend mode, alpha switch or color interpretation at fixed opacity also retained them. The two paths can produce identical intermediate Blend pixels. + +Bind a 32 × 16 single-channel F32 image with one white pixel at (10,8) to a 16 × 64 U16 bridge. Use an unmasked Switch with fixed opacity 1, U16 output, then a centered quarter-size bitmap quadrant with automatic filtering. In the final U16 stamp the column at x = 7, rows 30–34, reads **0, 2048, 12288, 2048, 0**. Rebind the same bridge pixels directly at 16 × 64 to get **0, 1280, 5632, 1280, 0**. A F32 Blend output followed by the U16 stamp gives the latter values. A U8 Blend output gives **0, 1285, 5654, 1285, 0**. + +For the five field controls, use 32 × 64 to 128 × 32, 32² to 32², 32² to 64 × 32, 64² to 16 × 32 and 32 × 16 to 16 × 64. Use byte, byte, byte, word and F32 sources, respectively. At zero-based size index j, use seed 108131 + 53j. Set channel c to ((23x + 71y + 11xy + 13j + 53c) mod 263)/262, mark the texel at one third of the width and half the height white, and round PNG samples to the nearest stored level. Compare automatic and bilinear filtering after a direct input, Switch, Copy and Add. Use (.125,.3125,.6875,.40625) for the optional background. For the mask and depth controls, bind the field on either side against (.375,.375,.375,.375), move opacity between −.25 and 1.25 and try masks of 0, .5 and 1. For the property controls, drive one property at a time from a literal, folded addition of zero, a sequence reading an exposed value, image size or seed, or a missing getter. + +The float-to-byte writer adds centered noise in units of 1/256 and diffused quantization error in units of 1/255 before rounding. Use a zero F32 16 × 3 image and set the first texel to 50.997/255, 50.998/255, 50.999/255, then 51/255. On conversion to a 16 × 4 U8 input the first texel reads **50, 50, 51, 51**. A 256 × 3 constant F32 image of 128/255 retains byte 128 throughout. Further controls use exact byte and word levels stored in F32, binary fields, one-F32-step offsets around predicted thresholds, and independent gray and four-channel fields. The eight source sizes are 31 × 23, 23 × 31, 7 × 23, 15 × 23, 31 × 32, 32 × 23, 63 × 47 and 33 × 21. At index j and channel c use u = ((71x + 31y + 17xy + 3j + 43c + 109273 + 19j) mod 383)/382, then .75u plus .25 wherever (5x + 7y + 3j + c) mod 17 > 9. + +The asymmetric Blend background also exposed the grayscale Uniform conversion. A fixed RGB value of (.125,.3125,.6875) produces .375, independent of alpha. The fixed signed tuple (1.75,−.875,−.25) gives .20833333. The twelve color controls cover primary, equal-channel, out-of-range and nearly canceling values as literals and exposed four-component inputs. The latter still differ in two F32 settings, including the signed tuple. The four remaining RGBA Copy pixels in the mask and interpretation series occur in color interpretation modes 2 and 3 at full opacity. + +| Independent comparison | Renders | Exact before / compared | Maximum before, U8 / U16 / F16 / F32 | Exact after / compared | Maximum after, U8 / U16 / F16 / F32 | +|---|---:|---:|---|---:|---| +| Field, depth and filter | 252 | 526,630/534,528 | — / 15676 / — / 0.239200413 | 534,528/534,528 | — / 0 / — / 0 | +| Blend side, mask and color interpretation | 168 | 339,359/344,064 | — / — / — / 0.239200413 | 344,060/344,064 | — / — / — / 1.090765e-05 | +| Blend mode, output depth and exposed opacity | 204 | 410,250/417,792 | — / — / — / 0.241184056 | 417,792/417,792 | — / — / — / 0 | +| Property source and image filtering | 112 | 280,856/286,720 | — / — / — / 0.239200413 | 286,720/286,720 | — / — / — / 0 | +| Single impulse through Blend | 12 | 12,282/12,288 | — / 6656 / — / — | 12,288/12,288 | — / 0 / — / — | +| Earlier graph, background and depth controls | 155 | 172,800/172,800 | — / 0 / 0 / 0 | 172,800/172,800 | — / 0 / 0 / 0 | +| Odd-sized procedural image fields | 130 | 149,097/149,504 | 1 / 0 / — / 0 | 149,504/149,504 | 0 / 0 / — / 0 | +| Byte boundaries and sparse ramps | 74 | 71,448/75,776 | 1 / — / — / — | 75,776/75,776 | 0 / — / — / — | +| Single-step threshold controls | 56 | 20,682/26,112 | 1 / 0 / — / 0 | 26,112/26,112 | 0 / 0 / — / 0 | +| Fixed and exposed Uniform colors | 192 | 17,280/27,648 | 164 / 42139 / 0.642578006 / 0.642999947 | 27,456/27,648 | 0 / 0 / 0 / 2.98023224e-08 | + +The property-source row counts completed image comparisons. In 16 additional attempts, the reference evaluated a sequence that read the seed before returning a literal. MaterialCraft reported an undefined seed variable for both grayscale and RGBA. Those attempts have no local pixel result. + +For the 45 additional grayscale settings, start with rows 3 and 4 of the [six-size field](#pattern-draw-order-for-fixed-and-runtime-image-slots). At each size compare empty inputs, background alone, stamps alone, each slot alone and each slot with background. Change one control at a time across all three filters, both blend modes, one image slot, square expansion, full or zero opacity and fixed position and rotation. Repeated settings count once. The expanded color series also includes row 0 and single-tile controls at 32² using a white bitmap or procedural shape 2 or 3. Use seeds 31, 12071 and 68047, fixed tint (.6875,.375,.8125,.78125) or white, then vary hue, saturation, lightness and alpha individually by .5 or in combination. The single-tile series includes exact fixed-color and lightness-only settings. Hue, saturation and alpha differences keep the color generator open. + +| Root (inventory index) | Distinct settings | U8 exact / total · max | U16 exact / total · max | F16 exact / total · max | F32 exact / total · max | +|---|---:|---:|---:|---:|---:| +| Pattern Tile Generator (373) | 221 | 32,256/32,256 · 0 | 202,496/202,496 · 0 | 77,312/77,312 · 0 | 445,440/445,440 · 0 | +| Pattern Tile Generator Color (374) | 331 | 19,701/20,992 · 50 | 146,125/155,136 · 15147 | 33,005/34,304 · 0.193847656 | 422,513/554,752 · 0.366030335 | +| Pattern Tile Random (375) | 52 | 23,208/26,624 · 255 | 169,553/177,664 · 65535 | 19,655/23,552 · 1 | 78,668/88,832 · 1.00000006 | +| Pattern Tile Random Color (376) | 126 | 26,868/30,720 · 255 | 172,566/181,760 · 65535 | 23,591/27,648 · 1 | 275,964/379,648 · 1.00000006 | + +| MaterialCraft save reopened by both applications | Renders | Cross-application exact / compared | Maximum, U8 / U16 / F16 / F32 | +|---|---:|---:|---| +| Pattern Tile Generator | 57 | 178,688/178,688 | 0 / 0 / 0 / 0 | +| Pattern Tile Generator Color | 57 | 124,284/144,896 | 50 / 15147 / 0.193847656 / 0.231126025 | +| Pattern Tile Random | 30 | 76,704/107,008 | 255 / 65535 / 1 / 1.00000006 | +| Pattern Tile Random Color | 30 | 75,455/107,008 | 255 / 65535 / 1 / 1.00000006 | +| Selected Blend controls | 35 | 72,704/72,704 | — / 0 / — / 0 | +| Odd-sized inputs | 48 | 33,536/33,536 | 0 / 0 / — / 0 | +| Uniform controls | 44 | 6,336/6,336 | 0 / 0 / 0 / 0 | +| Additional grayscale generator settings | 10 | 25,600/25,600 | — / — / — / 0 | +| Additional color generator settings | 12 | 4,775/9,216 | — / — / — / 0.341796875 | + +Both applications reproduced their own originals on all 323 reopened renders. For the grayscale generator alone this covers 204,288/204,288 exact cross-application pixels across 67 reopens. The two random tilers still differ in pattern placement and composition. Previously exact controls retained 403,712/403,712 pixels across 93 grayscale Splatter settings, 354,560/354,560 across 55 color Splatter settings and 591,616/591,616 across 80 grayscale Radial Blur settings, all with maximum zero. + +All three new release regressions failed before their respective fixes and passed afterward. The 406 release evaluation and node tests passed using the committed resource set. Formatting, strict workspace Clippy, dependency layering and all ten WebAssembly checks passed. + ## 2026-11-20 root comparisons ### Hue, saturation, lightness and Replace Color diff --git a/docs/sbs-root-nodes.md b/docs/sbs-root-nodes.md index 8d02b7ff..9bb4d9cd 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 **442 Parity**, **104 In progress** and **0 Too hard**. The November 17–21 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) +The first pass covered all **546 roots**, with **166 Parity** and **380 Too hard**. The current inventory has **443 Parity**, **103 In progress** and **0 Too hard**. The November 17–21 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) [Pattern tiling axes and copy bounds across 215 renders](parity-fixes.md#tiling-axes-and-pattern-copy-bounds) · [Grayscale sampler measurements](parity-fixes.md#grayscale-sampling-of-color-inputs) · [Value sampling across 240 typed comparisons](parity-fixes.md#value-processor-texture-filtering) · [Five saved graphs reopened in the reference](parity-fixes.md#saved-filter-graphs-and-scalar-levels-controls) @@ -492,10 +492,10 @@ Creased matches 10,947,840/10,947,840 pixels across 100 distinct settings throug | [pattern_splatter_circular.sbs/splatter_circular](../assets/sbs/pattern_splatter_circular.sbs) | 7 | No | [In progress · 130,917/132,096 exact pixels in 9 renders](parity-fixes.md#other-roots-using-uniform-arc-tangents) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | | [pattern_splatter_circular.sbs/splatter_circular_color](../assets/sbs/pattern_splatter_circular.sbs) | 7 | No | [In progress · 130,678/132,096 exact pixels in 9 renders](parity-fixes.md#other-roots-using-uniform-arc-tangents) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | | [pattern_stripes.sbs/stripes](../assets/sbs/pattern_stripes.sbs) | 0 | No | [Parity · 762,880/762,880 pixels across 83 distinct settings](parity-fixes.md#pixel-ratio-in-rectangular-directional-filters) | -| [pattern_tile_generator.sbs/tile_generator](../assets/sbs/pattern_tile_generator.sbs) | 7 | No | [In progress · 639,564/640,768 pixels across 176 distinct settings](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#beveled-square-gradient-and-wave-stamps) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | -| [pattern_tile_generator.sbs/tile_generator_color](../assets/sbs/pattern_tile_generator.sbs) | 7 | No | [In progress · 484,468/505,088 pixels across 152 distinct settings](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#tile-weave-splatter-and-fiber-stage-comparisons) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | -| [pattern_tile_random.sbs/tile_random](../assets/sbs/pattern_tile_random.sbs) | 2 | No | [In progress · 291,084/316,672 pixels across 52 distinct settings](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#tile-random-image-and-soft-patterns) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | -| [pattern_tile_random.sbs/tile_random_color](../assets/sbs/pattern_tile_random.sbs) | 2 | No | [In progress · 498,989/619,776 pixels across 126 distinct settings](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#signed-bitmap-blend-precision) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | +| [pattern_tile_generator.sbs/tile_generator](../assets/sbs/pattern_tile_generator.sbs) | 7 | No | [Parity · 757,504/757,504 pixels across 221 distinct settings](parity-fixes.md#selected-blend-inputs-and-odd-sized-float-backgrounds-in-tile-generators) · [Previous bitmap-slot comparisons](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#beveled-square-gradient-and-wave-stamps) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | +| [pattern_tile_generator.sbs/tile_generator_color](../assets/sbs/pattern_tile_generator.sbs) | 7 | No | [In progress · 621,344/765,184 pixels across 331 distinct settings](parity-fixes.md#selected-blend-inputs-and-odd-sized-float-backgrounds-in-tile-generators) · [Previous bitmap-slot comparisons](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#tile-weave-splatter-and-fiber-stage-comparisons) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | +| [pattern_tile_random.sbs/tile_random](../assets/sbs/pattern_tile_random.sbs) | 2 | No | [In progress · 291,084/316,672 pixels across 52 distinct settings](parity-fixes.md#selected-blend-inputs-and-odd-sized-float-backgrounds-in-tile-generators) · [Previous bitmap-slot comparisons](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#tile-random-image-and-soft-patterns) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | +| [pattern_tile_random.sbs/tile_random_color](../assets/sbs/pattern_tile_random.sbs) | 2 | No | [In progress · 498,989/619,776 pixels across 126 distinct settings](parity-fixes.md#selected-blend-inputs-and-odd-sized-float-backgrounds-in-tile-generators) · [Previous bitmap-slot comparisons](parity-fixes.md#pattern-draw-order-for-fixed-and-runtime-image-slots) · [Previous storage and whole-root comparisons](parity-fixes.md#parameter-controlled-sizes-and-half-precision-pattern-backgrounds) · [Earlier whole-root comparison](parity-fixes.md#signed-bitmap-blend-precision) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) | | [pattern_tile_random_2.sbs/functions/debug_find_cell](../assets/sbs/pattern_tile_random_2.sbs) | 0 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) | | [pattern_tile_random_2.sbs/tile_random_2](../assets/sbs/pattern_tile_random_2.sbs) | 5 | No | [Parity · 285,184 exact pixels in 38 renders](parity-fixes.md#shared-lookups-and-environment-shadow-pass) | | [pattern_tile_sampler.sbs/arrow](../assets/sbs/pattern_tile_sampler.sbs) | 0 | Yes | [Parity · seven 512×512 runs, four formats](parity-fixes.md#transform-edges-and-floating-point-filtering) |