Commit Graph
62 Commits
Author SHA1 Message Date
chasse20 4b5c27188c Auto: Fix HDR mipmaps and reuse image processing buffers
Prevent overflow in nearest-filter mipmaps and retain regression coverage. Reuse pattern, precision, channel and blur buffers. Wait for asynchronous parameter cooks in snapshot tests. Complete scoped cleanup and remove confirmed unused dependencies. Validated affected release suites, Clippy, layering, wasm, hostile-input checks and all 43 offscreen snapshots.
2026-11-17 03:28:21 +00:00
dotCooCoo 2ee4537c65 Merge main into feat/image-craft-texture 2026-11-16 16:45:08 -08:00
chasse20 591845cfa2 Auto: Preserve finite HDR constants in sharpen
Use wider arithmetic only when finite inputs overflow a Float32 axial difference. Add a regression while preserving the existing ramp results.
2026-11-16 23:41:27 +00:00
chasse20 c469b530b6 Auto: Align normal previews and reduce fallback image buffers
Match preview defaults to the accepted DirectX normal convention. Preserve finite HDR blur values and infer missing dot operands from the connected vector width.

Avoid full-size fallback images in channel shuffle and raster compositing, skip incompatible background resampling, and return early for missing gradients. Complete scoped naming, spacing and comment cleanup and remove the unused workspace bytemuck declaration.

Integrate main's shared format readers and external web library resources.

Validated with affected-package release tests, Clippy, layer and wasm checks, panic_hunt, offscreen snapshots, and comparable resource probes.
2026-11-16 23:03:07 +00:00
chasse20 2adfed268f Remove comparison tooling and simplify node docs 2026-11-16 03:57:33 -05:00
chasse20 04d1b3889f Fix atomic filters, channel selection and backgrounds 2026-11-16 03:32:03 -05:00
chasse20 9f390d4960 Fix node defaults, missing inputs and SBS serialization 2026-11-16 01:34:47 -05:00
dotCooCoo bee8c3feb8 Merge main into feat/image-craft-texture
main's per-axis wrapping, stored sampling and integer-sampling flag now
come from craft-texture (storytold/craft-libs#1709). Every craft-libs
dependency is pinned to that pull request's head, 92fb3fa8.
2026-11-15 10:48:09 -08:00
FredApps 46a7d647d2 Fix missing If/Else value branch types 2026-11-15 11:19:47 +01:00
dotCooCoo 06a2af7eea Image: blur keeps images made with raised limits
The sampled-kernel and box passes of `ops::gaussian` built their output
with the default limits. For an image wider or taller than 8192 pixels,
made with a raised `max_side`, the sampled pass clamped its output to
8192 pixels and the box pass returned the unblurred source. Both passes
now build their output with limits that admit the source's size.
2026-11-14 16:31:03 -08:00
dotCooCoo 9744afda83 Image: use craft-texture's image planes and sampling
Replace the local materialcraft-image crate with craft-texture from
storytold/craft-libs (storytold/craft-libs#1216), with its parallel
feature on. engine re-exports it as `engine::image`. Every craft-libs
dependency moves to the same revision, 29fb8f8e.

The image fields are private in craft-texture. Callers read them through
width(), height(), kind() and data(), and decoders, the pixel processor
and the pattern raster build images with Image::from_data, which rejects
an empty size or a buffer of the wrong length with an error.

This changes some pixels at the edges of the float range:
- a repeated sample far from the origin keeps its phase instead of
  stopping at a clamped texel position
- generate_uv spreads its coordinates over the clamped size
- bilinear samples and box downsampling of values near f32::MAX stay
  finite
- linear_to_srgb(NaN) returns NaN instead of -0.055

The box blur's running sum in nodes/src/ops.rs now uses f64 as well,
so a blur of values near f32::MAX no longer overflows.

#225 fixes the generate_uv fault in the local crate; craft-texture
includes that fix.
2026-11-14 15:59:55 -08:00
chasse20 1a7225c8c2 Auto: Reuse SBS parsing and fix stale preview cache failures
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.
2026-11-14 22:52:26 +00:00
Chris Hassebrook bb7434478c Matching CI to TextureCraft (#222)
* ci: port TextureCraft verification improvements

* fix: keep CI green on stable Rust
2026-11-14 08:52:48 +01:00
chasse20 e9b777bee2 CPR review #1 2026-11-14 03:45:23 +00:00
chasse20 2318d25a3a Improve clean-room SBS evaluation parity 2026-11-13 11:46:15 -05:00
chasse20 46802a44fc Merge latest SBS branch improvements
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.
2026-11-12 18:52:32 -05:00
chasse20 3432f14b53 Fix SBS resource resolution and shared graph rendering
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.
2026-11-12 18:46:34 -05:00
PiJellyPin cf0a32dd1c Fixing node pairity
loading images to slow
2026-11-13 00:12:41 +01:00
chasse20 bd0284959e Import SBS library and checkpoint compatibility work
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
2026-11-11 02:09:41 -05:00
chasse20 709cd7f86e Fix function instance inputs and cache refresh 2026-11-10 05:15:39 -05:00
chasse20 131c7b8853 Fix parameter defaults, sizing and tooltips 2026-11-10 04:54:21 -05:00
chasse20 85e0bf9247 Add parameter-owned function graphs 2026-11-10 04:07:54 -05:00
chasse20 a0032d6ac2 Add SBS function library and Explorer graph editing 2026-11-08 17:25:08 -05:00
chasse20 570bc528a6 Add linked graph instances 2026-11-07 18:23:51 -05:00
chasse20 8101e8da68 Refine graph outputs and Explorer 2026-11-07 17:00:36 -05:00
chasse20 b99ca7f361 Improve function editing and link swaps 2026-11-07 15:49:40 -05:00
Belligerently be871550c0 Keep black and white backgrounds in Color dodge and Color burn
The W3C color-dodge formula keeps a black background black even under a
white foreground, and color-burn keeps a white background white even
under a black foreground. blend_channel checked the foreground first, so
both edge cases came out inverted.

Fixes #135
2026-11-06 13:04:13 -05:00
d05d2bf0a9 Clamp enum and degenerate-range parameters to hard limits (#115)
A hostile file or binding could supply an out-of-range enum or degenerate-range numeric value that reaches a cook unclamped, breaking the hard-limits guarantee for node parameters.

Make clamp_params bound enum values even with no options and bound numeric values even when min is not below max, using the same hard-span limits as other parameters.

Test: clamp_params_bounds_enum_without_options failed before the change and passes after.

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>
2026-11-06 10:10:32 +01:00
chasse20 2adbdf4aab Merge main while preserving native graph architecture 2026-11-06 00:58:56 -05:00
chasse20 fe88ee5c4d Unify graph editors and optimize material workflows 2026-11-06 00:13:10 -05:00
chasse20 d318484b41 Checkpoint native SBS primitive workflow
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.
2026-11-05 18:23:06 -05:00
FredApps 56407b9470 Revert the batch rollback and restore prior main 2026-11-05 22:04:58 +01:00
Rafael Mendes a7b9194820 Revert reviewed PR batch and cancel 0.1.3 preparation
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.
2026-11-05 17:48:14 -03:00
Rafael Mendes f48a0b559e Merge pull request #94 from Belligerently/fix/distance-source-propagation
Fix Distance node edge artifacts with exact source propagation
2026-11-05 16:01:46 -03:00
Rafael Mendes cc9a5b3c82 Keep bitmap color-space requests unambiguous and inspectable 2026-11-05 15:19:39 -03:00
Rafael Mendes 0a561fa681 Integrate normal-to-height solver with the complete filter regression suite 2026-11-05 15:08:06 -03:00
Rafael Mendes 8e14183b8f Apply hard safety bounds during parameter resolution without restricting manual editing 2026-11-05 15:00:27 -03:00
Rafael Mendes cf7ffa16fa Merge branch 'review/pr-80' into review/pr-82 2026-11-05 14:52:27 -03:00
Rafael Mendes 9015d88f15 Register the shared filter regression module once 2026-11-05 14:52:25 -03:00
Rafael Mendes 3ad3e387c9 Merge branch 'fix/noise-tiling-seams' of https://github.com/SteamSmith/materialcraft into review/pr-82 2026-11-05 14:51:38 -03:00
Rafael Mendes 3ec7a33d4b Merge branch 'fix/splatter-bounded' of https://github.com/SteamSmith/materialcraft into review/pr-81 2026-11-05 14:51:00 -03:00
Rafael Mendes 2f0a595001 Preserve normal blend regression alongside bounded blur tests 2026-11-05 14:50:58 -03:00
Rafael Mendes 2748778c9f Merge branch 'fix/normal-blend-nan' of https://github.com/SteamSmith/materialcraft into review/pr-75 2026-11-05 14:38:54 -03:00
SteamSmithandClaude Sonnet 5.5 47b69c0f3a chore(merge): bring fix/bitmap-colour-space up to date with main
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>
2026-11-05 12:10:10 -05:00
Rafael Mendes cee6a7a38f Merge branch 'fix/18-function-math' of https://github.com/storytold/materialcraft into review/pr-69 2026-11-05 14:07:01 -03:00
Belligerently 61aec6f9ff Fix Distance source propagation with exact nearest-mask sites 2026-11-05 12:02:51 -05:00
SteamSmithandClaude Sonnet 5.5 fc1257baa4 chore(merge): bring fix/anisotropic-blur-bounded up to date with main
Kept this PR's O(1) horizontal Gaussian and upstream's non-finite sigma guard; dropped
upstream's pass/kernel caps, which the single pass makes redundant.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 11:57:51 -05:00
Rafael Mendes 82373ba8f7 Merge pull request #40 from simonhull/fix/enforce-param-ranges
Nodes: clamp parameters to hard limits before cooking
2026-11-05 10:35:51 -03:00
SteamSmithandClaude Sonnet 5.5 8c6fcf64f8 fix(nodes): scale the coarse levels of Normal to Height correctly
The multigrid solve divided the slope divergence by the level's scale where it
must multiply (one coarse pixel spans `scale` full-size pixels), so the coarse
levels contributed almost nothing and the broad shape was lost. A Gaussian bump
round-tripped through Height to Normal now correlates 0.99+ at 256 and 1024 px
(0.86 at 256 before).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 07:16:49 -05:00
SteamSmithandClaude Sonnet 5.5 84bd8f8b9d fix(nodes): clamp numeric parameters to their declared ranges
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>
2026-11-05 07:13:59 -05:00