mirror of
https://github.com/storytold/materialcraft.git
synced 2026-11-25 08:50:58 +01:00
Verify color conversion and world-unit normal roots across four formats
This commit is contained in:
1 parent
10bd618132
commit
1149831797
2 files changed
+29
-6
No files matched your search
@@ -76,6 +76,29 @@ Repeat the November 17 **3D linear gradient** cases with that change. At 256² a
|
||||
|
||||
With the original shared lookup described under [basic and ridged 3D Perlin](#basic-and-ridged-3d-perlin), **basic 3D Perlin** now matches 65,536/65,536 pixels at 256² and 16,384/16,384 in each of the other six cases, including changed LUM16, LUM16F and LUM32F. All maximum errors are zero. With the applications' respective stock lookups, only 173/16,384 and 663/65,536 LUM8 pixels match. Both maxima are 203 levels.
|
||||
|
||||
### Color conversion, checker and clone
|
||||
|
||||
The ACEScg-to-linear-sRGB root matches **131,072/131,072 RGBA pixels across eight cases**, maximum component error zero. Bind the following original linear RGBA8 fields directly to its image input. At integer texel `(x,y)` on an `N×N` field, let `U=floor(255*x/(N-1))` and `V=floor(255*y/(N-1))`. Arithmetic in the four stored byte channels wraps modulo 256.
|
||||
|
||||
- Foreground RGBA is `(17*x+31*y, 3*x+7*y, 11*x+5*y, 5*x+11*y)`.
|
||||
- Background RGBA is `(29*x+13*y, 255-U, V, 13*x+3*y)`.
|
||||
- The scalar mask is `7*x+9*y`.
|
||||
|
||||
For the first four cases, use the foreground field at 128² and 256² with seed zero, repeat 128² with seed 42, then substitute the background at 128² with seed zero. The RGBA8 outputs match 16,384, 65,536, 16,384 and 16,384 pixels respectively. For the four remaining cases, keep the 128² background input, cook at 64² with seed 42, and select U8, U16, F16 and F32 on the final processor. Each format matches 4,096/4,096 pixels. The float32 output contains 4,096 distinct RGBA values and spans −0.53148961 to 1.51964462.
|
||||
|
||||
Two other roots match the original four eight-bit cases at 128²/256², including seed 42 and the changed settings below. Each matches 114,688/114,688 eight-bit pixels, maximum error zero. The 64² seed-42 format sweep keeps both roots open.
|
||||
|
||||
| Root and changed setting | U8 exact / max | U16 exact / max | F16 exact / max | F32 exact / max |
|
||||
|---|---:|---:|---:|---:|
|
||||
| `checker_1.sbs/checker_1`, tiling 3, 45-degree rotation enabled | 4,096 / 0 | 4,096 / 0 | 3,740 / 4.8828125e-4 | 4,096 / 0 |
|
||||
| `clone.sbs/clone`, offset (.17, −.25), mask blur 0, original foreground and mask | 4,096 / 0 | 4,073 / 1 | 4,096 / 0 | 994 / 1.192093e-7 |
|
||||
|
||||
Each format column compares all channels of 4,096 pixels. Clone uses 128² input fields in the 64² cases.
|
||||
|
||||
### Height to normal in world units
|
||||
|
||||
Both roots in `height_to_normal_world_units.sbs` match **131,072/131,072 RGBA pixels each** across eight cases. For a square grayscale height input, store `(17*x+31*y) mod 256` at each integer coordinate. Use default settings at 128² and 256², repeat 128² with seed 42, then set `surface_size=100`, `height_depth=8`, `normal_format=0` and `sampling=1` at 128² with seed zero. Each root matches 16,384, 65,536, 16,384 and 16,384 RGBA8 pixels respectively. Keep those changed settings and the 128² input, then cook at 64² with seed 42. U8, U16, F16 and F32 each match 4,096/4,096 pixels for both roots. Every maximum error is zero. Each 64² output contains 49 distinct normals.
|
||||
|
||||
## 2026-11-17 root comparisons
|
||||
|
||||
The clean-room comparisons below use the 16.0.7 reference app with the Direct3D 11 backend and a release MaterialCraft CPU cook. They compare the raw output bridge at its stored precision. A pixel counts only when every channel agrees. Integer errors are in stored levels. Floating errors are absolute. Each case starts from the graph defaults. Where a row selects another storage format, set the final processor's format to absolute in both apps before cooking.
|
||||
|
||||
@@ -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 **167 Parity**, **12 In progress** and **367 Too hard**. The November 17 pass revisited every unresolved root through `3D_worley_noise`. The next unresolved root in inventory order is `alveolus.sbs/alveolus`. See the [November 17 comparisons](parity-fixes.md#2026-11-17-root-comparisons) for exact counts, output formats and remaining differences.
|
||||
The first pass covered all **546 roots**, with **166 Parity** and **380 Too hard**. The current inventory has **170 Parity**, **14 In progress** and **362 Too hard**. The November 17 and 18 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)
|
||||
|
||||
## Complete inventory
|
||||
|
||||
@@ -110,18 +110,18 @@ The first pass covered all **546 roots**, with **166 Parity** and **380 Too hard
|
||||
| [cartesian_polar_transformation.sbs/polar_to_cartesian_grayscale](../assets/sbs/cartesian_polar_transformation.sbs) | 1 | No | [Too hard: sampling/rounding](parity-fixes.md#remaining-differences) |
|
||||
| [cells_1.sbs/cells_1](../assets/sbs/cells_1.sbs) | 0 | Yes | [Too hard: noise field](parity-fixes.md#remaining-differences) |
|
||||
| [channel_mixer.sbs/channel_mixer](../assets/sbs/channel_mixer.sbs) | 1 | No | [Too hard: function parameter output](parity-fixes.md#remaining-differences) |
|
||||
| [checker_1.sbs/checker_1](../assets/sbs/checker_1.sbs) | 0 | Yes | [Too hard: scaled filtering](parity-fixes.md#remaining-differences) |
|
||||
| [checker_1.sbs/checker_1](../assets/sbs/checker_1.sbs) | 0 | Yes | [In progress · 356 half-float differences at 64²](parity-fixes.md#color-conversion-checker-and-clone) |
|
||||
| [checker_2.sbs/checker_2](../assets/sbs/checker_2.sbs) | 0 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [chrominance_extract.sbs/chrominance_extract](../assets/sbs/chrominance_extract.sbs) | 1 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [clamp.sbs/clamp](../assets/sbs/clamp.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [clamp.sbs/clamp_grayscale](../assets/sbs/clamp.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [clone.sbs/clone](../assets/sbs/clone.sbs) | 2 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [clone.sbs/clone](../assets/sbs/clone.sbs) | 2 | No | [In progress · U16 and F32 differ at 64²](parity-fixes.md#color-conversion-checker-and-clone) |
|
||||
| [clone_patch.sbs/transform_from_center](../assets/sbs/clone_patch.sbs) | 1 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [clone_patch.sbs/transform_to_center](../assets/sbs/clone_patch.sbs) | 1 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [clone_patch.sbs/transform_to_center_grayscale](../assets/sbs/clone_patch.sbs) | 1 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [clouds_1.sbs/clouds_1](../assets/sbs/clouds_1.sbs) | 0 | Yes | [Too hard: noise field](parity-fixes.md#remaining-differences) |
|
||||
| [clouds_2.sbs/clouds_2](../assets/sbs/clouds_2.sbs) | 0 | Yes | [Too hard: noise field](parity-fixes.md#remaining-differences) |
|
||||
| [color_space_conversion.sbs/acescg_to_linear_srgb](../assets/sbs/color_space_conversion.sbs) | 1 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [color_space_conversion.sbs/acescg_to_linear_srgb](../assets/sbs/color_space_conversion.sbs) | 1 | No | [Parity · eight cases in four formats](parity-fixes.md#color-conversion-checker-and-clone) |
|
||||
| [color_space_conversion.sbs/acescg_to_srgb](../assets/sbs/color_space_conversion.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [color_space_conversion.sbs/linear_srgb_to_acescg](../assets/sbs/color_space_conversion.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [color_space_conversion.sbs/linear_srgb_to_srgb](../assets/sbs/color_space_conversion.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
@@ -224,8 +224,8 @@ The first pass covered all **546 roots**, with **166 Parity** and **380 Too hard
|
||||
| [hdr_range_viewer.sbs/hdr_range_viewer_grayscale](../assets/sbs/hdr_range_viewer.sbs) | 1 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [height_blend.sbs/height_blend](../assets/sbs/height_blend.sbs) | 3 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [height_extrude.sbs/impl/acceleration_struct_impl](../assets/sbs/height_extrude.sbs) | 1 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [height_to_normal_world_units.sbs/height_to_normal_world_units](../assets/sbs/height_to_normal_world_units.sbs) | 1 | Yes | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [height_to_normal_world_units.sbs/height_to_normal_world_units_2](../assets/sbs/height_to_normal_world_units.sbs) | 1 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [height_to_normal_world_units.sbs/height_to_normal_world_units](../assets/sbs/height_to_normal_world_units.sbs) | 1 | Yes | [Parity · eight cases in four formats](parity-fixes.md#height-to-normal-in-world-units) |
|
||||
| [height_to_normal_world_units.sbs/height_to_normal_world_units_2](../assets/sbs/height_to_normal_world_units.sbs) | 1 | No | [Parity · eight cases in four formats](parity-fixes.md#height-to-normal-in-world-units) |
|
||||
| [highpass.sbs/highpass](../assets/sbs/highpass.sbs) | 1 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [highpass.sbs/highpass_grayscale](../assets/sbs/highpass.sbs) | 1 | No | [Too hard: remaining pixel differences](parity-fixes.md#remaining-differences) |
|
||||
| [histogram_range.sbs/histogram_range](../assets/sbs/histogram_range.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
|
||||
Reference in new issue
Block a user