Skip to main content

MAX_SAMPLES

Constant MAX_SAMPLES 

Source
pub const MAX_SAMPLES: usize = 64;
Expand description

The most points a resampled contour may carry.

The field is fullscreen and evaluates a min over every segment at every pixel of every frame, so this is a per-pixel O(N) budget rather than a memory one — which is why exceeding it is a load error rather than a silent decimation.

The number is measured, and the measurement disagreed with ADR-0107’s construction by an order of magnitude. core/tests/path_cost.rs prices the contour walk at ~0.105 ms per segment at 1920x1080 on the integrated adapter docs/nfr.md §1’s floor is calibrated against; the ADR predicted ~2 % of such a GPU at 32 segments and measured 26 %. At 64 the field alone is 46 % of the floor’s 16.67 ms frame budget, which is the most that can be spent while leaving the composite chain room — so this is where the ceiling sits, and it is the same value as DEFAULT_SAMPLES because that is where the two independent answers landed.