CultMath.hlsl: the capacity note names no resource type
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8a0b98f70f
commit
b6f61ea8c4
3 changed files with 4 additions and 4 deletions
|
|
@ -572,8 +572,8 @@ A shader function cannot take a span, so `cultmath_power_border(p, sites, count)
|
|||
and `cultmath_weighted_lattice_cells(p, time, bodies, count, ...)` take `float4 sites[CULTMATH_MAX_SITES]` by value and the
|
||||
count in use, with `count` in `[0, CULTMATH_MAX_SITES]`. `CULTMATH_MAX_SITES` is 128 unless the consumer defines it before
|
||||
including the library (`#ifndef`): 128 covers every Aetheria zone within GLSL ES 3.00's 224 guaranteed fragment uniform
|
||||
vectors, and loops run to `count`, so the capacity costs uniform space, not iterations. A `StructuredBuffer` caller copies
|
||||
into a local array first; the library takes no resource, accessor macro or uniform of its own. The preconditions the C#
|
||||
vectors, and loops run to `count`, so the capacity costs uniform space, not iterations. A caller whose sites live in a
|
||||
buffer copies them into a local array first; the library takes no resource, accessor macro or uniform of its own. The preconditions the C#
|
||||
functions throw for are the caller's in a shader (finite arguments, `cellSize > 0`, the stated ranges, `p` within 2^23
|
||||
cells). The ring pass is bounded `k <= 37` and exits as C# does; the box pass recomputes each distance instead of caching
|
||||
75 x 75 of them, which gives the same values. The C# mirror compiles the array as `T[]`, and
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ float cultmath_lattice_smooth_step(float m, float d, float f1, float smoothing)
|
|||
|
||||
// Sites by value: a shader function cannot take a span, so these take float4 sites[CULTMATH_MAX_SITES] and the count in use, with
|
||||
// count in [0, CULTMATH_MAX_SITES]. A consumer defines CULTMATH_MAX_SITES before including this file to change the capacity; loops
|
||||
// run to count, so the capacity costs uniform space, not iterations. A StructuredBuffer caller copies into a local array first.
|
||||
// run to count, so the capacity costs uniform space, not iterations. A caller whose sites live in a buffer copies them into a local array first.
|
||||
// The preconditions the C# functions throw for are the caller's in a shader: finite arguments, cellSize > 0, boost in [0, 4],
|
||||
// falloff > 0, smoothing in (0, 1], stretch in [1, 2], p within 2^23 cells. A zero stretchNormal means (1, 0) and needs stretch == 1.
|
||||
// cultmath_weighted_lattice_cells is math.weighted_lattice_cells: the ring pass is bounded by k <= 37 and exits as C# does, and the
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ float cultmath_lattice_smooth_step(float m, float d, float f1, float smoothing)
|
|||
|
||||
// Sites by value: a shader function cannot take a span, so these take float4 sites[CULTMATH_MAX_SITES] and the count in use, with
|
||||
// count in [0, CULTMATH_MAX_SITES]. A consumer defines CULTMATH_MAX_SITES before including this file to change the capacity; loops
|
||||
// run to count, so the capacity costs uniform space, not iterations. A StructuredBuffer caller copies into a local array first.
|
||||
// run to count, so the capacity costs uniform space, not iterations. A caller whose sites live in a buffer copies them into a local array first.
|
||||
// The preconditions the C# functions throw for are the caller's in a shader: finite arguments, cellSize > 0, boost in [0, 4],
|
||||
// falloff > 0, smoothing in (0, 1], stretch in [1, 2], p within 2^23 cells. A zero stretchNormal means (1, 0) and needs stretch == 1.
|
||||
// cultmath_weighted_lattice_cells is math.weighted_lattice_cells: the ring pass is bounded by k <= 37 and exits as C# does, and the
|
||||
|
|
|
|||
Loading…
Reference in a new issue