diff --git a/packages/cultmath/THIRD-PARTY-NOTICES.md b/packages/cultmath/THIRD-PARTY-NOTICES.md index d6da41ea..b0d2f4c1 100644 --- a/packages/cultmath/THIRD-PARTY-NOTICES.md +++ b/packages/cultmath/THIRD-PARTY-NOTICES.md @@ -9,7 +9,9 @@ Gustavson's `webgl-noise` project and Unity Mathematics. `math.snoise(float3)` and `cultmath_snoise(float3)` follow `src/noise3D.glsl` and `math.snoise(float2)` follows `src/noise2D.glsl` of stegu/webgl-noise at commit `22434e04d7753f7e949e8d724ab3da2864c17a0f` (the simplex-boundary fix is -`21d9fe23d7`, scale `ff3b5d34ea`, permutation `a3e6d57095`). +`21d9fe23d7`, scale `ff3b5d34ea`, permutation `a3e6d57095`). Modified from upstream: +the 3D corner tie order follows Gustavson's `simplexnoise1234`, because the +upstream `step` compares are cyclic where the offset's components are equal. `math.snoise_grad`/`cultmath_snoise_grad` (and the `fbm_grad`/`ridged_grad` octave sums built on them) follow the analytic-gradient differentiation from diff --git a/packages/cultmath/docs/design.md b/packages/cultmath/docs/design.md index d29ade17..01119faf 100644 --- a/packages/cultmath/docs/design.md +++ b/packages/cultmath/docs/design.md @@ -356,7 +356,12 @@ together, laid out as `float4(gradient.xyz, value.w)`, with no value-only twin that permutation helper, so its values changed too, while its own kernel (`0.5`) and scale (`130`) already matched upstream. `NoiseGradTests.SnoiseAndItsGradientAreContinuousAcrossSimplexCellBoundaries` - pins the continuity. + pins the continuity. Ties in the offset `x0` resolve in Gustavson's + `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. - `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/unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md b/packages/cultmath/unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md index 72efd7c1..f7e22fd0 100644 --- a/packages/cultmath/unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md +++ b/packages/cultmath/unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md @@ -9,7 +9,9 @@ Gustavson's `webgl-noise` project and Unity Mathematics. `math.snoise(float3)` and `cultmath_snoise(float3)` follow `src/noise3D.glsl` and `math.snoise(float2)` follows `src/noise2D.glsl` of stegu/webgl-noise at commit `22434e04d7753f7e949e8d724ab3da2864c17a0f` (the simplex-boundary fix is -`21d9fe23d7`, scale `ff3b5d34ea`, permutation `a3e6d57095`). +`21d9fe23d7`, scale `ff3b5d34ea`, permutation `a3e6d57095`). Modified from upstream: +the 3D corner tie order follows Gustavson's `simplexnoise1234`, because the +upstream `step` compares are cyclic where the offset's components are equal. `math.snoise_grad`/`cultmath_snoise_grad` (and the `fbm_grad`/`ridged_grad` octave sums built on them) follow the analytic-gradient differentiation from