Integrate main's read limits and preserve the font, evaluator, converter,
and measured preview repairs. Complete the scoped type, comment, and
spacing cleanup.
Reuse one validated XML document for library layout and graph reads.
Associate cache maintenance completion with its submitted revision so
old failures cannot consume new settings or clear requests.
Cap retained output and decoded-image data, bypass oversized entries, and give thumbnail cooks smaller cache budgets. Limit visible preview work to one cancellable cook, yield to foreground edits, and evict old GPU thumbnails.
Cover cache eviction, image and library lifetimes, cancellation, and repeated preview rendering with regression checks.
Preserve resource and rendering fixes alongside updated library previews, node UI, and function input support. Reconcile evaluator state and loop caching while retaining both sets of regression tests.
Use the supplied attributed resources, replace legacy surface and font references on import, and keep resource credits outside SBS files.
Correct function evaluation state, FX-Map roughness and regions, primitive rendering, gradient handling, and scalar luminosity validation. Add regression coverage for resource import and shared rendering behavior.
Add 548 native library packages and 11 original resource substitutes,
with rewritten descriptions/layouts, shared resource references and
bundled assets for desktop and browser builds. Retain supplied graph
implementations; presentation changes are not an independent rewrite.
Preserve baseline SBS formatVersion and refresh updaterVersion on saves.
Fix foreign resource bindings, native parameter/port mappings, scalar
channel functions, FX-Map roughness and bounded graph expansion.
Validation: release core/formats/nodes/eval/engine tests, converter
tests, strict Clippy on Rust 1.96, layering, WASM, formatting and diff
checks passed during this work. All 560 library files reproduce exactly.
Bricks cooks without errors; the full library audit still reports 308
warning entries and 10 standalone function compilation failures.
Work in progress: node-local Set scope, remaining native parameter
support, primitive numerical parity and external save/reopen validation.
The motionblur identifier needs reference-runtime investigation.
Refs #191
* Hash bound input-image resources into graph instance cache keys
A graph instance can show a stale preview image after its bound bitmap resource is replaced, because the instance cache key never changes. Hashing those resources makes the instance re-cook when the bitmap changes.
Include the content hashes of resources referenced by graph.input_images (and their linear flags) in graph_tree_hash, and add a regression test that cooks an instance, replaces the bound resource bytes, and asserts the new image is cooked instead of the cached one.
Test: bound_input_image_resource_change_recooks_instance failed before the change and passes after.
* Address review for pull request 110
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Replace the legacy Rust procedural library with clean-room native primitives, typed function execution and FX-Map graphs. Save supported content as native SBS and organize the model, evaluators, codecs and editors into focused modules.
Add shared graph editing behavior, flat filtered node menus, frame and comment editing, named Explorer outputs and an original atomic sample. Document the tested scope and remaining interoperability work.
Restore tracked files to 91bb53f07a, immediately before the batch, at the maintainer request. Preserve the existing history and earlier work, including PR #38. Revert the 50 reviewed PR merges and the version bump in 441092c. The published 0.1.2 release is unchanged.
Upstream's ResourceBytes and decode limits kept; decode keeps the linear flag, and the
decoded-image memo is now keyed by (content hash, linear) so sRGB and data reads of the
same file don't collide.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
resolve_params only checked types, so a hand-edited file, a binding to an
exposed input or a dynamic function could pass any float or int to a cook
(including NaN and 1e30). Clamp Float, Int and Float2 parameters to the
declared min/max in resolve_params (new clamp_params; non-finite values fall
back to the default; angles are left alone) and again in eval after bindings
and functions have run.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
decode() sRGB-decoded every 8/16-bit color bitmap, so an RGB normal map
(0.5, 0.5, 1) became (0.214, 0.214, 1). decode now takes a linear flag. The
Bitmap node gets a Color space choice (sRGB by default, so existing files cook
the same) and graph input preview images can be bound as linear data maps
(graph.input.bind linear: true, stored in input_images_linear).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Editing a graph two levels below an instance node left the instance's cached result stale, and
bitmaps of equal length with equal headers shared a cache key.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The cooker sets the running cook's cancel flag when the graph changes again and starts the
new cook at once; eval::cook takes &Mutex<Cache> and locks per lookup/insert.
An exposed-input change re-cooked 21 of 21 nodes in rusty_metal; now 1 (the reader).
Input-change cook (noisy, concurrent load): 1024 ~320 ms -> ~0.1 ms, 2048 ~1500 ms -> ~0.2 ms.
Resources carry a content hash (ResourceBytes); the decoder memo is keyed on it and pruned.
Graphs that use themselves, directly or through other instanced graphs, give an explicit error.
A freed image's memory comes back for the next one, so two different input images
could share a cache key (the Linux CI run hit a stale cook). The key is now the size
plus 4096 strided values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parameters can be driven by function graphs evaluated against graph inputs
(graph.node.function); graphs store input presets (graph.preset.*). Graph
inputs and graph-instance parameters share one editor for floats, ints,
bools, enums and colors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A clean-room, pure-Rust foundation for MaterialCraft's node-based material
authoring: the package/graph/node model, float image planes, the node
library (atomic nodes, tileable noises, patterns, filters, PBR utilities,
function graphs for the pixel processor), a content-addressed cooking cache,
.mcraft packages and texture export, and the command-driven session with
snapshot undo. Infrastructure (xtask, CI, packaging) copied from TextureCraft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>