diff --git a/packages/cultmath/docs/design.md b/packages/cultmath/docs/design.md index 01119faf..24e94c2c 100644 --- a/packages/cultmath/docs/design.md +++ b/packages/cultmath/docs/design.md @@ -360,8 +360,8 @@ together, laid out as `float4(gradient.xyz, value.w)`, with no value-only twin `simplexnoise1234` order (x over y, y over z, x over z), a total order, so the four corners are always a simplex. Upstream's `step` compares are cyclic: where the three components are equal, which includes the origin and every - `(t, t, t)`, the corners repeat the origin vertex and the value jumps by up to - 0.77. `NoiseGradTests.SnoiseIsContinuousOnTheSimplexDiagonal` pins the order. + `(t, t, t)`, the corners repeat the origin vertex and the value jumps by about + 0.77 near the origin and up to 1.56 at magnitudes of 64 and above. `NoiseGradTests.SnoiseIsContinuousOnTheSimplexDiagonal` pins the order. - `snoise_grad(float3 p)` carries `snoise(float3)` to value-and-gradient form, following the differentiation in webgl-noise `src/noise3Dgrad.glsl` (Ashima Arts / Ian McEwan, MIT), which uses the same radius, permutation and scale as diff --git a/packages/cultmath/tests/CultMath.Tests/NoiseGradTests.cs b/packages/cultmath/tests/CultMath.Tests/NoiseGradTests.cs index f55cf38e..153886db 100644 --- a/packages/cultmath/tests/CultMath.Tests/NoiseGradTests.cs +++ b/packages/cultmath/tests/CultMath.Tests/NoiseGradTests.cs @@ -192,7 +192,8 @@ public sealed class NoiseGradTests // The simplex diagonals are where x0's three components compare equal. The tie rule must be a total // order there (math.snoise): with a cyclic or all-strict compare the four corners stop being a - // simplex and the value jumps by up to 0.77 on the line (t, t, t), lattice diagonals included. + // simplex and the value jumps on the line (t, t, t), lattice diagonals included: about 0.77 near the + // origin, up to 1.56 at magnitudes of 64 and above. [Fact] public void SnoiseIsContinuousOnTheSimplexDiagonal() {