Math: tileable noise, display gamma and explicit channel springs #7

Merged
ilusha merged 2 commits from Math into master 2026-10-27 23:46:16 +03:00

2 commits

Author SHA1 Message Date
4171ee1d02 Math: make spring animation explicit and channel based
Some checks failed
Windows / build (pull_request) Has been cancelled
CMake on a single platform / build (pull_request) Has been cancelled
CMake / build (pull_request) Has been cancelled
SpringValue advances by a caller-supplied delta in substeps of at most 1 ms
instead of reading the global clock. It supports parameter sets, snapping,
launching with initial velocity and a settled test based on distance and
velocity.

SpringChannels applies the same implementation to scalars, vectors, rectangles
and colours, replacing the duplicated SpringVec and SpringRect paths.
2026-10-27 23:31:41 +03:00
3a2639bd5c Math: add tileable noise and display gamma conversion
TileableNoise builds a seeded permutation table and evaluates periodic 2D
gradient noise with quintic interpolation. Fractal noise sums weighted octaves,
increasing frequency and period together so the result tiles at every octave.

gammaToLinear and linearToGamma provide clamped gamma 2.2 conversion for
linear-light colour blending. Tests cover periodicity, bounds, seed variation,
octave tiling, reference values and round trips.
2026-10-27 23:31:41 +03:00