CultLib/tests/GameCult.Geometry.Tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 111b918ec0 Make CultMath normalize follow dxc and release 0.2.2
dxc 1.9.0.5402 lowers float2/3/4 normalize(x) to x * Rsqrt(Dot(x, x)),
and DXIL.rst defines Rsqrt as 1 / sqrt(src). A zero vector normalizes
to NaN and a NaN component poisons every component. CultMath divided
by max(length, 1e-20), which returned 0 for a zero vector and a huge
finite component beside a NaN one.

- math.normalize(float2/3/4) is now value * (1 / sqrt(dot(value, value))).
- The HLSL mirror drops cultmath_normalize and its epsilon constant: it
  now equals the normalize intrinsic, and nothing consumed it.
- HlslSemanticsTests pins zero and NaN normalize, the rsqrt bit pattern,
  and zero length/distance. design.md states the rule and notes that
  DXIL.rst's Rsqrt special-value table is a copy of Round's.
- GameCult.Geometry's iso-surface gave degenerate triangles (an inside
  vertex on the isovalue) a zero normal through the old epsilon. It now
  guards them explicitly, with a test.
- quaternion normalize keeps its identity fallback: quaternion is not
  an HLSL type.
- Bump to 0.2.2 and rebuild the tracked Unity DLL and pdb.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 18:04:04 +02:00
..
Fixtures/vg-csg-ragnarok Verify Rust geometry payload interop 2026-05-30 00:04:05 +01:00
GameCult.Geometry.Tests.csproj Verify Rust geometry payload interop 2026-05-30 00:04:05 +01:00
GeometryDocumentTests.cs Make generated and reflective document members one rule 2026-09-13 22:00:16 +02:00
IsoSurfaceTests.cs Make CultMath normalize follow dxc and release 0.2.2 2026-09-14 18:04:04 +02:00