CultMath shaders: restore the float2 segment overloads, sample close distinct sites, document the border step's owner contract
Shader overloads stay native (ruling shader-overloads-stay-native): cultmath_segment_closest and cultmath_distance_to_segment have float2 and float3 forms again, with mirror asserts and fixture families. The rejected "avoid overloads" comment and design text are gone. The border step's outside-cell behaviour (distance 0 with that plane's normal) is documented in C# and the HLSL header and pinned by a test; the mirror and fixture gain distinct sites closer than 1e-2. GLSL and fixture regenerate in the next commit; this one does not pass CommittedGlslEqualsLowering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fcd580a8ed
commit
16657fa20f
7 changed files with 81 additions and 8 deletions
|
|
@ -510,7 +510,8 @@ general). The exact power cell border is a second pass: `power_border_step(p, ow
|
|||
running `float4(unit normal toward the owner, distance)` and the radical plane of `owner` against `other`, with
|
||||
the distance built from the offset `owner - p` and the weight difference `(w1 - w2)(w1 + w2)` so it does not
|
||||
cancel for close sites seen from far; the cell boundary distance is the least over every site except the owner
|
||||
(the fold's nearest), and a site coincident with the owner has no plane. `power_border(p, sites)` is that loop.
|
||||
(the fold's nearest), and a site coincident with the owner has no plane. The step trusts the caller's owner: a
|
||||
query outside the owner's cell reports distance 0 with that plane's normal, not an error. `power_border(p, sites)` is that loop.
|
||||
Cell spans refuse a non-finite query, site position or weight, and more than 2^24 sites (indices are floats).
|
||||
`power_cells` and
|
||||
`multiplicative_cells` are that loop over a `ReadOnlySpan<float4>` and nothing else; a shader caller writes the
|
||||
|
|
@ -521,8 +522,7 @@ apply. `CultSiteCells` holds the two score fields and the two site indices (floa
|
|||
circle, negative inside it, -1 when `a` and `b` coincide. `soft_gabriel_gate(sites, first, second, softness)`
|
||||
is `smoothstep(-softness, softness, least margin over every other site)` on positions alone, 1 when no other site
|
||||
exists; it is C# only. `distance_to_segment(point, start, end)` has out-free 2D and 3D forms beside the `out`
|
||||
form, all over one public `segment_closest` per dimension. The shader twins keep one name each (3D only, a 2D
|
||||
caller uses z = 0), so none joins the overload rename list.
|
||||
form, all over one public `segment_closest` per dimension, each with its 2D and 3D shader overload.
|
||||
|
||||
## Intervals
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue