Skip to main content

band_steps

Function band_steps 

Source
pub fn band_steps(steps: f32) -> f32
Expand description

The band count the sample sites are handed: clamped into [0, MAX], then rounded to an integer, with a non-finite binding falling back to off.

This is kaleidoscope.rs’s fold_order treatment for fold_order’s reason, on a different seam. [smoothing] and preset dissolves sweep a binding continuously between two settings, and a fractional band count does not step — it leaves every band boundary crawling across the field, one per frame, which reads as shimmer rather than as a colour change. Rounding on the CPU keeps that precondition on the CPU, where it is visible.