CultLib/packages/cultmath/shaders
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 799029bebe af_range finds a NaN endpoint by its bit pattern, which dxc's fast-math compare cannot fold [af-range-nan-guard-folded-by-dxc]
dxc marks compares fast, so `lo == lo ? lo : -inf` was deleted under default flags and an
overflowed form ranged to NaN on HLSL targets. The guard now tests (asuint(lo) & 0x7fffffff)
> 0x7f800000, in HLSL, the Unity copy, math.Affine.cs and the regenerated CultMath.glsl.
dxc 1.9.0.5402 -T ps_6_0 default flags: before, no fcmp/select/and in the af_range body;
after, and/icmp ugt/select to +-inf for both endpoints (also under -Gis).
AffineRangeMirrorMatchesCSharpBitForBitAtTheFloatExtremes pins the mirror at zero to the
float maximum, infinities and NaN components.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 11:09:25 +02:00
..
CultMath.Affine.hlsl af_range finds a NaN endpoint by its bit pattern, which dxc's fast-math compare cannot fold [af-range-nan-guard-folded-by-dxc] 2026-10-04 11:09:25 +02:00
CultMath.Affine.hlsl.meta Affine forms in HLSL: CultMath.Affine.hlsl mirrors math.Affine.cs bit for bit; iv_snoise_ball(float2); the GLSL lowering carries them 2026-10-04 09:47:49 +02:00
CultMath.glsl af_range finds a NaN endpoint by its bit pattern, which dxc's fast-math compare cannot fold [af-range-nan-guard-folded-by-dxc] 2026-10-04 11:09:25 +02:00
CultMath.hlsl Affine forms in HLSL: CultMath.Affine.hlsl mirrors math.Affine.cs bit for bit; iv_snoise_ball(float2); the GLSL lowering carries them 2026-10-04 09:47:49 +02:00
CultMath.hlsl.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
CultMath.Interval.hlsl Affine forms in HLSL: CultMath.Affine.hlsl mirrors math.Affine.cs bit for bit; iv_snoise_ball(float2); the GLSL lowering carries them 2026-10-04 09:47:49 +02:00
CultMath.Interval.hlsl.meta CultMath intervals: cultmath_iv_* over float2(lo, hi) in C# and HLSL, with snoise and fbm ball bounds 2026-10-02 19:52:33 +02:00
CultMath.Phacelle.glsl CultMath GLSL: Phacelle lowered into its own MPL-2.0 file; iv_frustum_ball and iv_exp in the fixture 2026-10-03 13:40:16 +02:00
CultMath.Phacelle.hlsl CultMath HLSL: write the shader in the subset GLSL ES 3.00 shares, bit for bit 2026-10-02 20:09:44 +02:00
CultMath.Phacelle.hlsl.meta CultMath: Phacelle port moves into MPL-2.0 files; prune cut pinned by boundary points 2026-09-30 00:34:27 +02:00