CultLib/packages/cultmath/unity/org.gamecult.cultmath
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 19e23db211 Make double min/max follow DXIL FMin/FMax
dxc lowers double min/max to dx.op.binary.f64 opcodes 36/35 (FMin/FMax),
the same operations as float, so Math.Min/Math.Max (NaN-propagating) was the
wrong rule. Double min/max now use the float formulas, with NaN and signed-zero
assertions beside the float ones. Tracked Unity DLL rebuilt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 14:47:10 +02:00
..
Runtime Make double min/max follow DXIL FMin/FMax 2026-09-14 14:47:10 +02:00
Shaders Match float min, max, clamp, and saturate to DXIL FMin/FMax/Saturate 2026-09-14 14:32:19 +02:00
LICENSE.md Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
LICENSE.md.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
package.json Check bridge declarations, not file names; strip manifest BOMs 2026-09-14 13:57:03 +02:00
package.json.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
README.md Ship CultMath 0.2.0 to Unity with a UnityEngine conversion bridge 2026-09-14 13:30:00 +02:00
README.md.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
Runtime.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
Shaders.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
THIRD-PARTY-NOTICES.md Ship CultMath 0.2.0 to Unity with a UnityEngine conversion bridge 2026-09-14 13:30:00 +02:00
THIRD-PARTY-NOTICES.md.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00

CultMath for Unity

This is CultMath's Unity 2021.3-compatible Git-UPM surface. It contains the precompiled CultMath.dll, portable symbols, the numeric Shaders/CultMath.hlsl mirror, and the CultMath.UnityBridge assembly.

CultMath.UnityBridge is the only C# source Unity compiles here. It holds the UnityEngine conversions the engine-free core cannot declare: ToCultMath() on Vector2/3/4, Vector2Int/3Int, Quaternion, and Color; ToUnity() on float2/3/4, int2/3, and quaternion; ToColor() on float4. C# only admits conversion operators on the source or target type, so these are extension methods rather than implicit casts. Import CultMath.UnityBridge to use them.

Unity does not compile CultMath's repository source tree. That source uses the current C# language and remains owned by the normal .NET project. The package imports only the tracked auto-referenced precompiled assembly, so consumers do not need csc.rsp language overrides or an asmdef propagation shim.

Build and inspect the package from the repository root:

.\scripts\build-unity-package.ps1

The builder fresh-builds CultMath for netstandard2.1, verifies the tracked DLL/PDB and stable Unity metadata, and stages an inspectable package under artifacts/unity/org.gamecult.cultmath.

Consume the repository package with:

"org.gamecult.cultmath": "https://github.com/GameCult/CultLib.git?path=/packages/cultmath/unity/org.gamecult.cultmath"

Production consumers should pin that URL to a commit or release tag.