mirror of
https://github.com/storytold/materialcraft.git
synced 2026-11-21 23:10:54 +01:00
Verify pattern phase coefficients and paired integer storage
This commit is contained in:
1 parent
195a317b1a
commit
4e0782db02
2 files changed
+3
-3
No files matched your search
@@ -158,7 +158,7 @@ For the two signed series, generate a 32² U16 image with level ((17x+113y+59xy+
|
||||
|
||||
### Pattern rotation phase
|
||||
|
||||
An original horizontal gradient distinguishes .5 from 1.5 turns and .75 from 1.75 turns. The latter rotations leave a small cross-axis component. At 1.5 turns, a stamp four pixels wide and 256 pixels high gives a fitted component of 1.87244e−7. At −3.75 turns the corresponding component is −7.49176e−7. MaterialCraft’s pixel sine and cosine give 1.87254e−7 and −7.49014e−7 from the stored F32 angles. The pattern renderer now uses that same phase calculation. Edges with an exactly zero axis component keep their image-space boundary rule.
|
||||
An original horizontal gradient distinguishes .5 from 1.5 turns and .75 from 1.75 turns. The latter rotations leave a small cross-axis component. At 1.5 turns, a stamp four pixels wide and 256 pixels high gives a fitted component of 1.87244e−7. At −3.75 turns the corresponding component is −7.49176e−7. MaterialCraft’s pixel sine and cosine give 1.87261e−7 and −7.49045e−7 from the stored F32 angles (bits 34491200 and b5491200). The pattern renderer now uses that same phase calculation. Edges with an exactly zero axis component keep their image-space boundary rule.
|
||||
|
||||
| Original controls | Renders | Previously exact | Now exact / compared | Maximum absolute error by format |
|
||||
|---|---:|---:|---:|---|
|
||||
@@ -169,7 +169,7 @@ An original horizontal gradient distinguishes .5 from 1.5 turns and .75 from 1.7
|
||||
| Shape and render-region edge controls | 104 | 618,848 | 618,848/647,168 | 1.78813934e-07 F32 |
|
||||
| Oblique square footprints | 78 | 4,542,719 | 4,542,720/4,542,720 | 0 F32 |
|
||||
|
||||
For the first row draw a centered unit horizontal gradient. On a 64² canvas, visit −4 through 4 turns in quarter turns, then 1.5 plus each of [−2⁻²⁰,−2⁻²³,2⁻²³,2⁻²⁰], .5 plus [−2⁻²⁰,−2⁻²⁴,2⁻²⁴,2⁻²⁰], and finally [.1875,−.1875,.625,.8125]. Use seed 42313+53j with zero-based angle index j. Add 256×32 and 32×256 at −2.5, −.5, .5, 1.5, 1.75, 2, 2.5 and 3.5 turns. Use F32 throughout and also U16 at −2.5, .5, 1.5, 1.75, 2.5 and 3.5. The extended-angle U16 subset goes from 122,078 to 122,042 exact pixels out of 122,880, with maximum error one level.
|
||||
For the first row draw a centered unit horizontal gradient. On a 64² canvas, visit −4 through 4 turns in quarter turns, then 1.5 plus each of [−2⁻²⁰,−2⁻²³,2⁻²³,2⁻²⁰], .5 plus [−2⁻²⁰,−2⁻²⁴,2⁻²⁴,2⁻²⁰], and finally [.1875,−.1875,.625,.8125]. Use seed 42313+53j with zero-based angle index j. Add 256×32 and 32×256 at −2.5, −.5, .5, 1.5, 1.75, 2, 2.5 and 3.5 turns. Use F32 throughout and also U16 at −2.5, .5, 1.5, 1.75, 2.5 and 3.5. The extended-angle U16 subset goes from 122,078 to 122,042 exact pixels out of 122,880, with maximum error one level. For all 18 paired U16 and F32 settings, applying U16 storage to each app’s own F32 samples reproduces all 122,880 of its U16 levels. The 838 differing U16 samples originate before output storage.
|
||||
|
||||
For the thin-gradient row use a 256² F32 canvas, height 1 and widths 1/8, 1/32 and 1/64. Center the first two widths and offset the last by .25 pixel on both axes. Use turns [−3.75,−3,−2.5,−1.75,−1.5,−.5,0,.5,1.5,1.75,2,2.25,2.5,2.75,3,3.5,4,1.5−2⁻²³,1.5+2⁻²³] and seed 53851+43j+k for angle j and width k. The maximum pixel error drops from 2.39610672e−5 to 8.34465027e−7. The square that previously missed pixel (307,492) uses size (.755,.391), offset (−.1113,.1437), .13125 turns, seed 1108 and a 512² F32 output. Its right and lower neighbors remain outside. [Shape and render-region controls](#quarter-turn-stamps-and-render-bounds)
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ Pattern center culling matched all 356,352 pixels across 204 renders. Background
|
||||
| [gradient_axial.sbs/gradient_axial](../assets/sbs/gradient_axial.sbs) | 0 | No | [Parity · 15 cases, 165,120 exact pixels](parity-fixes.md#luminosity-axial-gradients-color-lookup-and-luminance-merge) |
|
||||
| [gradient_axial.sbs/gradient_axial_reflected](../assets/sbs/gradient_axial.sbs) | 0 | No | [Parity · 15 cases, 165,120 exact pixels](parity-fixes.md#luminosity-axial-gradients-color-lookup-and-luminance-merge) |
|
||||
| [gradient_circular.sbs/gradient_circular](../assets/sbs/gradient_circular.sbs) | 0 | No | [Parity · 13 cases across sizes, seeds and storage formats](parity-fixes.md#runtime-angles-and-circular-gradient) |
|
||||
| [gradient_linear_1.sbs/gradient_linear_1](../assets/sbs/gradient_linear_1.sbs) | 0 | No | [In progress · 435,744/435,968 pixels across 47 renders](parity-fixes.md#pattern-rotation-phase) |
|
||||
| [gradient_linear_1.sbs/gradient_linear_1](../assets/sbs/gradient_linear_1.sbs) | 0 | No | [In progress · 435,744/435,968 pixels across 47 renders, all 224 differences at rotation 3](parity-fixes.md#pattern-rotation-phase) |
|
||||
| [gradient_linear_2.sbs/gradient_linear_2](../assets/sbs/gradient_linear_2.sbs) | 0 | No | [Parity · 8 cases, grayscale in four formats](parity-fixes.md#linear-gradient-2-and-multiangle-albedo) |
|
||||
| [gradient_linear_3.sbs/gradient_linear_3](../assets/sbs/gradient_linear_3.sbs) | 0 | No | [In progress · 265,072/277,760 pixels across 23 renders](parity-fixes.md#pattern-rotation-phase) |
|
||||
| [gradient_radial.sbs/gradient_radial](../assets/sbs/gradient_radial.sbs) | 0 | No | [Parity · 171,264 exact pixels across 18 renders](parity-fixes.md#color-conversion-gradient-height-and-histogram-controls) |
|
||||
|
||||
Reference in new issue
Block a user