Commit graph CultLib/src/GameCult.Geometry
Author SHA1 Message 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
Meta Vens
63d6094c94 Clarify CultMath and CultGeometry ownership 2026-08-26 17:47:06 +02:00
Meta Vens
5b2c36329d Add CultGeometry isosurface extraction 2026-08-26 17:37:22 +02:00
Meta Vens
4f306edca6 Add shared geometry value primitives 2026-06-27 14:34:59 +01:00
Meta Vens
53f469cec2 Update MessagePack dependency 2026-06-17 03:35:30 +01:00
Meta Vens
1fd8a9f226 Verify Rust geometry payload interop 2026-05-30 00:04:05 +01:00
Meta Vens
d8d0c4c8a0 Document geometry state over CultMesh 2026-05-29 23:49:14 +01:00
Meta Vens
a0e95358b8 Align geometry document fingerprints with Rust 2026-05-29 23:44:45 +01:00
Meta Vens
69ac7b5b4b Add CultCache geometry documents 2026-05-29 23:25:36 +01:00