CultMath 0.4.0: version, changelog, NuGet packs CultMath.Affine.hlsl

Bumps CultMath.csproj, the Unity package.json, the org.gamecult.cultlib
dependency and the semver-policy paragraph to 0.4.0. CHANGELOG states the snoise
tie rule under Breaking and the additions since 0.3.0. The tracked DLL and pdb
still read 0.3.0 at this commit, so the release script's parity check fails here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-09 22:03:43 +02:00
commit 84c4bb14e3
5 changed files with 50 additions and 4 deletions

View file

@ -111,7 +111,7 @@ swap under "Changed" rather than "Breaking".
## Pre-1.0 packages
A package at `0.y.z` (currently `org.gamecult.cultmath`, at `0.3.x`) uses the
A package at `0.y.z` (currently `org.gamecult.cultmath`, at `0.4.x`) uses the
standard pre-1.0 convention: `MAJOR` stays `0` during initial development, so
`MINOR` carries what `MAJOR` means once the package reaches `1.0.0`. Concretely:

View file

@ -10,7 +10,7 @@
<PackageId>GameCult.Math</PackageId>
<!-- MIT overall; math.Phacelle.cs and CultPhasor.cs (and the two Phacelle HLSL files) are MPL-2.0. -->
<PackageLicenseExpression>MIT AND MPL-2.0</PackageLicenseExpression>
<Version>0.3.0</Version>
<Version>0.4.0</Version>
<Description>Clean-room C# math shaped for HLSL-style renderer code.</Description>
<Authors>GameCult</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>
@ -25,6 +25,7 @@
<None Include="..\..\shaders\CultMath.hlsl" Pack="true" PackagePath="contentFiles\any\any\shaders\CultMath.hlsl" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\shaders\CultMath.Phacelle.hlsl" Pack="true" PackagePath="contentFiles\any\any\shaders\CultMath.Phacelle.hlsl" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\shaders\CultMath.Interval.hlsl" Pack="true" PackagePath="contentFiles\any\any\shaders\CultMath.Interval.hlsl" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\shaders\CultMath.Affine.hlsl" Pack="true" PackagePath="contentFiles\any\any\shaders\CultMath.Affine.hlsl" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\THIRD-PARTY-NOTICES.md" Pack="true" PackagePath="\" />
</ItemGroup>

View file

@ -5,6 +5,51 @@ 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.4.0]
### Breaking
- `math.snoise(float3)` and `math.snoise_grad`, and their HLSL mirrors in
`Shaders/CultMath.hlsl`, now resolve ties among the components of the cell
offset in a fixed order: x over y, y over z, x over z. The cyclic rule they
used before made the origin and every point on the `(t, t, t)` diagonal read a
different function from the points beside it. Values change at the origin and
on the `(t, t, t)` diagonal and nowhere else; off that tie set the results are
bit-identical to 0.3.0. `snoise` is now continuous across the diagonal to
within 1e-4 over two ulps either side (`NoiseGradTests`,
`SnoiseIsContinuousOnTheSimplexDiagonal`). Content seeded from `snoise` at
those points changes; regenerate it when you take this version.
### Added
- Interval arithmetic on `float2(lo, hi)`: `math.iv_point`, `iv_add`, `iv_sub`,
`iv_mul`, `iv_neg`, `iv_scale`, `iv_abs`, `iv_min`, `iv_max`, `iv_clamp`,
`iv_saturate`, `iv_lerp`, `iv_sqr`, `iv_sqrt`, `iv_exp`, `iv_smoothstep`,
`iv_snoise_ball` (`float3` and `float2` centres), `iv_fbm_ball` and
`iv_frustum_ball`, with the HLSL mirrors in the new
`Shaders/CultMath.Interval.hlsl`. Each function returns an interval that
contains the pointwise float32 result for every input in the operand
intervals; the enclosure tests check this without a tolerance.
- Reduced affine forms on `float3(x0, a, e)` that share one symbol over a
region: `math.af_point`, `af_symbol`, `af_range`, `af_from_iv`, `af_add`,
`af_add_iv`, `af_sub`, `af_neg`, `af_scale`, `af_mul`, `af_snoise`, `af_fbm`,
`af_frustum_axis` and `af_frustum_ball`, with the HLSL mirrors in the new
`Shaders/CultMath.Affine.hlsl`.
- Noise bound constants `math.SNOISE_LIPSCHITZ`, `SNOISE2_LIPSCHITZ` and
`SNOISE_HESSIAN`: empirical bounds with a margin, re-measured and pinned by
`NoiseBoundTests`.
- `math.asfloat(uint)`, the inverse of `math.asuint`.
- `BoundedLeastSquares.Solve` overload taking `kktRelativeTolerance`, and the
constant `BoundedLeastSquares.DefaultKktRelativeTolerance` (1e-6). The
tolerance must be finite and greater than zero, else the result is
`InvalidInput`. The overload without it passes the default and returns the same
result as before.
### Fixed
- The NuGet package `GameCult.Math` now carries `CultMath.Affine.hlsl` under
`contentFiles/any/any/shaders`, as the README says it does.
## [0.3.0]
### Breaking

View file

@ -1,7 +1,7 @@
{
"name": "org.gamecult.cultmath",
"displayName": "CultMath",
"version": "0.3.0",
"version": "0.4.0",
"unity": "2021.3",
"description": "Precompiled CultMath numeric primitives and matching HLSL semantics for GameCult Unity runtimes.",
"license": "MIT AND MPL-2.0",

View file

@ -4,7 +4,7 @@
"version": "1.0.60",
"unity": "2021.3",
"dependencies": {
"org.gamecult.cultmath": "0.3.0"
"org.gamecult.cultmath": "0.4.0"
},
"description": "CultCache, CultNet, and CultMesh managed runtime assemblies for Unity.",
"license": "MIT",