diff --git a/packages/cultmath/THIRD-PARTY-NOTICES.md b/packages/cultmath/THIRD-PARTY-NOTICES.md index 625d63a9..72efd7c1 100644 --- a/packages/cultmath/THIRD-PARTY-NOTICES.md +++ b/packages/cultmath/THIRD-PARTY-NOTICES.md @@ -37,5 +37,5 @@ gradient and the exact pruning are new here. `src/CultMath/math.Phacelle.cs`, `src/CultMath/CultPhasor.cs`, `shaders/CultMath.Phacelle.hlsl` and the Unity copy of that include. Each carries the MPL-2.0 header and this attribution. The rest of CultMath is MIT, - so the `GameCult.Math` NuGet package declares `MIT AND MPL-2.0` and ships this - file. The Unity package as a whole is MPL-2.0. + so the `GameCult.Math` NuGet package and the `org.gamecult.cultmath` Unity + package both declare `MIT AND MPL-2.0` and ship this file. diff --git a/packages/cultmath/src/CultMath/CultMath.csproj b/packages/cultmath/src/CultMath/CultMath.csproj index b4a6ce8b..0b1ee09f 100644 --- a/packages/cultmath/src/CultMath/CultMath.csproj +++ b/packages/cultmath/src/CultMath/CultMath.csproj @@ -10,7 +10,7 @@ GameCult.Math MIT AND MPL-2.0 - 0.2.4 + 0.3.0 Clean-room C# math shaped for HLSL-style renderer code. GameCult README.md diff --git a/packages/cultmath/unity/org.gamecult.cultmath/CHANGELOG.md b/packages/cultmath/unity/org.gamecult.cultmath/CHANGELOG.md index 871022f1..d02a6aab 100644 --- a/packages/cultmath/unity/org.gamecult.cultmath/CHANGELOG.md +++ b/packages/cultmath/unity/org.gamecult.cultmath/CHANGELOG.md @@ -5,6 +5,38 @@ All notable changes to this package are documented in this file. Earlier releases (0.2.0-0.2.3) predate this package's changelog and are not backfilled here; see `docs/semver-policy.md` for why. +## [0.3.0] + +### Breaking + +- `math.snoise(float3)` and `math.snoise(float2)`, and their HLSL mirrors + `cultmath_snoise`, return different values. The kernel now follows + stegu/webgl-noise. For 3D only, the falloff `r^2` constant is 0.5 (was 0.6) + and the output scale is 105 (was 42). For 2D, the falloff constant (0.5) and + the output scale (130) are unchanged. In both, the shared permutation offset + is now +10 (was +1), which changes the values of both. This removes the value + discontinuities the 3D kernel had at simplex cell boundaries. Any content + seeded from `snoise` changes; regenerate it when you take this version. + +### Added + +- `math.smin_grad`: smooth minimum with gradient, for `float4` operands + carrying the gradient in `xyz` and the value in `w`. +- `math.cellular` and the `CultCellular` result struct: cellular (Worley) + noise returning the gradient and distance to the nearest feature points. +- `math.snoise_grad`, `math.fbm_grad` and `math.ridged_grad`: simplex noise, + fractal Brownian motion and ridged multifractal with analytic gradients, + returned as `float4` with the gradient in `xyz` and the value in `w`. +- `math.phacelle` and the `CultPhasor` result struct: Phacelle noise with + gradient. `math.Phacelle.cs`, `CultPhasor.cs` and + `Shaders/CultMath.Phacelle.hlsl` are MPL-2.0 (see + `THIRD-PARTY-NOTICES.md`). +- `BoundedLeastSquares`: an allocation-free, deterministic bounded + least-squares solver (`Solve`) with a status result and the input contract + documented on the type. +- The matching `cultmath_*` HLSL mirrors of the functions above in + `Shaders/CultMath.hlsl` and `Shaders/CultMath.Phacelle.hlsl`. + ## [0.2.4] ### Added diff --git a/packages/cultmath/unity/org.gamecult.cultmath/LICENSE.md b/packages/cultmath/unity/org.gamecult.cultmath/LICENSE.md index 7e18d22d..e31bf344 100644 --- a/packages/cultmath/unity/org.gamecult.cultmath/LICENSE.md +++ b/packages/cultmath/unity/org.gamecult.cultmath/LICENSE.md @@ -1,8 +1,17 @@ # CultMath License -CultMath is licensed under the Mozilla Public License 2.0 (`MPL-2.0`). +CultMath is licensed under the MIT License (`MIT`), except for the Phacelle +files, which are licensed under the Mozilla Public License 2.0 (`MPL-2.0`): -The complete license text is available from the Mozilla Foundation at +- `Shaders/CultMath.Phacelle.hlsl` +- the Phacelle sources compiled into `Runtime/Plugins/CultMath.dll` + (`math.Phacelle.cs` and `CultPhasor.cs` in the GameCult/CultLib repository) + +The package license expression is therefore `MIT AND MPL-2.0`, matching the +`GameCult.Math` NuGet package. MPL-2.0 is file-level: it applies to those files +and not to the rest of CultMath. + +The MPL-2.0 text is available from the Mozilla Foundation at . Source and modification history for the precompiled assembly in this package are available in the GameCult/CultLib repository (`packages/cultmath`) at the corresponding package tag. diff --git a/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll b/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll index 2962aa2a..f2deff66 100644 Binary files a/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll and b/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.dll differ diff --git a/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.pdb b/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.pdb index c71111b1..a5b58985 100644 Binary files a/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.pdb and b/packages/cultmath/unity/org.gamecult.cultmath/Runtime/Plugins/CultMath.pdb differ 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 625d63a9..72efd7c1 100644 --- a/packages/cultmath/unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md +++ b/packages/cultmath/unity/org.gamecult.cultmath/THIRD-PARTY-NOTICES.md @@ -37,5 +37,5 @@ gradient and the exact pruning are new here. `src/CultMath/math.Phacelle.cs`, `src/CultMath/CultPhasor.cs`, `shaders/CultMath.Phacelle.hlsl` and the Unity copy of that include. Each carries the MPL-2.0 header and this attribution. The rest of CultMath is MIT, - so the `GameCult.Math` NuGet package declares `MIT AND MPL-2.0` and ships this - file. The Unity package as a whole is MPL-2.0. + so the `GameCult.Math` NuGet package and the `org.gamecult.cultmath` Unity + package both declare `MIT AND MPL-2.0` and ship this file. diff --git a/packages/cultmath/unity/org.gamecult.cultmath/package.json b/packages/cultmath/unity/org.gamecult.cultmath/package.json index fc0e64c7..5cd88f8d 100644 --- a/packages/cultmath/unity/org.gamecult.cultmath/package.json +++ b/packages/cultmath/unity/org.gamecult.cultmath/package.json @@ -1,10 +1,10 @@ { "name": "org.gamecult.cultmath", "displayName": "CultMath", - "version": "0.2.4", + "version": "0.3.0", "unity": "2021.3", "description": "Precompiled CultMath numeric primitives and matching HLSL semantics for GameCult Unity runtimes.", - "license": "MPL-2.0", + "license": "MIT AND MPL-2.0", "author": { "name": "GameCult" },