Files
craft-libs/crates/material-graph/tests/rules/pixel_state.tsv
T
Valentin Klein c3155aad96 Share the material graph runtime and WGSL pixel compiler (#3109)
* Extract the material graph runtime from TextureCraft

Preserve its evaluator, compiler, existing verification, and format reference from TextureCraft #777 at 22a37c29.

Original TextureCraft importer author: xilefenko (TextureCraft #521).

* Adapt graph helpers to the shared workspace lints

Preserve node evaluation and version tracking while splitting long dispatch branches. Update the EXR doctest and rule table references for the shared crate.

* Read the format reference with LF endings in its test

* Test that the format reference example reads the same with CRLF line endings

* Make the kind versions follow module attributes, arm order, raw strings, includes and the epoch

* Fix graph cache keys, publish, import and subgraph extraction; harden the graph tests

* Keep the cubic sampler from panicking on NaN texels; say what RGBE drops; check NaN halves by their bits

* Lower vector inputs of f_to_bool and f_vec to valid WGSL; tighten the FX-map error and pattern coverage tests; document clamping and the splatter data cutoff

* Say which composite glyph placements the font reader lacks; fail the y-up text test on a blank render

* Leave publish as it was; unit-test the WGSL vector lowering; document EPOCH and keep_outputs results

* Satisfy clippy in the version scanner and the WGSL lowering; compare cache hits by relation
2026-11-23 08:55:49 -05:00

1.8 KiB

1# Rule: a pixel processor's start state at pixel (x, y) of a W x H node: Jenkins' one-at-a-time hash over three 32-bit
2# words (not bytes): the seed as an integer, then the IEEE bits of the floats u = (x + 0.5) / W and v = (y + 0.5) / H
3# (computed in single precision): h = 0; for each word: h += w; h += h << 10; h ^= h >> 6; then h += h << 3; h ^= h >> 11;
4# h += h << 15; low 24 bits. A value processor is the same with u = v = 0 (the bits of 0.0). The first rand draws with the
5# function generator (a = 0x37573B, c = 0xC7C1; lcg_draws.tsv).
6# Tolerance: exact.
7# Columns: seed; x, y = the pixel; width, height = W, H; state = the start state; first_value = the first draw.
8seedxywidthheightstatefirst_value
900025625695330940.5138245820999146
100255255256256142707210.9945371150970459
11012885256256101873430.6483300924301147
1203625525625615267810.5518503189086914
1310025625690557380.1849116086959839
14125525525625632634450.5122809410095215
15112885256256141018960.2870802879333496
1613625525625679006610.6670260429382324
1750051251293426820.24136340618133545
185511511512512160558430.35252106189727783
19525617051251256321530.4461977481842041
2057351151251267274560.3327045440673828
211234500128256154508710.6627148389816284
221234512725512825657009390.24470579624176025
2312345648512825616579600.14348936080932617
24123451825512825653083240.7829368114471436
25700256128130002770.040654659271240234
267255127256128117503700.6682561635971069
2771284225612853270220.8189979791641235
28736127256128130709240.14043068885803223
290001111307340.1782318353652954
300001111307340.1782318353652954
310001111307340.1782318353652954
320001111307340.1782318353652954