CultLib/packages/cultmath/tools
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 7821e06d55 Add HLSL vector conversions, int clamp, and double frac to CultMath
Aetheria Cut 8a needs int2(float2), clamp(int, int, int), and
frac(double). Fill them in CultMath as dxc compiles them:

- generate-swizzles.ps1 emits same-size conversion constructors and
  math functions between float, int, and bool vectors. dxc lowers
  float to int as fptosi (toward zero; NaN and out-of-range undefined),
  numeric to bool as != 0 (fcmp une, NaN is true), bool to numeric as
  0 or 1. floatN(int) splat keeps floatN(0) from going ambiguous
  against floatN(intN).
- Int and int-vector clamp are min(max(x, a), b), matching dxc's
  IMin(IMax(x, a), b); inverted bounds return b.
- frac(double) keeps double precision. dxc demotes double frac to
  float, as it does exp and lerp; CultMath's existing double overloads
  already diverge that way, and design.md now says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 16:16:32 +02:00
..
compile-hlsl-spirv.ps1 Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
compile-hlsl-spirv.ps1.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
compile-spirv-metal.ps1 Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
compile-spirv-metal.ps1.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
generate-swizzles.ps1 Add HLSL vector conversions, int clamp, and double frac to CultMath 2026-09-14 16:16:32 +02:00
generate-swizzles.ps1.meta Generate every HLSL swizzle and mixed constructor; fix intrinsic types 2026-09-14 13:57:02 +02:00
get-dxc.ps1 Pin dxc to dxc_2026_07_29 and verify its SHA256 2026-09-14 14:17:11 +02:00
get-dxc.ps1.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
get-spirv-cross.ps1 Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
get-spirv-cross.ps1.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00