Changelog
All notable changes to libchaff (@tty-pt/chaff) are documented in this file.
[1.3.1] - 2026-12-02
Documentation
- Added
Doxyfile,.ttypt-docs, and Doxygen docblocks acrossinclude/ttypt/{chaff,chaff_surf,noise,chaff_glsl}.hfor completeman(3)API page generation (zero functional C code changes).
[1.3.0] - 2026-12-02
Added
- Continuous Multi-Scale Surface Cascade & GLSL ES 3.00 Mirror (
include/ttypt/chaff_surf.h,include/ttypt/chaff_glsl.h,npm/include/ttypt/*,src/libchaff.c,tests/test_cascade.c): - Added
<ttypt/chaff_surf.h>definingchaff_surf_t,chaff_surf_sample_t,chaff_surf_eval(),chaff_surf_eval_i32(), and 4-wide batchedchaff_surf_eval_i32_4x()for continuous torus-periodic $C^2$ quintic gradient cascades with Nyquist stride band-limiting, analytical surface gradients, diffeomorphic macro domain warping, and slope-damped ridged multifractal synthesis. - Added fast inline
chaff_fast_floor_i32()and unsigned/power-of-two fast paths inchaff_wrap_cell_i32(), plus hoisted warp cell splitting inchaff_surf_eval_i32_4x(). - Added 64-byte
std140chaff_surf_ubo_t,chaff_surf_pack_ubo(), and GLSL ES 3.00 cascade shader mirror in<ttypt/chaff_glsl.h>(withperiod_n > (0x7FFFFFFFu >> d)overflow guard inchaff_surf_axis_cells). - Added
tests/test_cascade.ccovering C-vs-4x parity, Nyquist monotonicity, torus periodicity, analytical gradients, and high-shift GLSL period overflow safety; syncednpm/include/ttypt/header mirrors.
[1.2.0] - 2026-12-01
Added
- Mobile Static Libraries (
android-lib+ios-lib) (.github/workflows/ci.yml): - Enabled Android (
arm64-v8a,x86_64) and iOS (arm64device/simulator +libchaff.xcframework.zip) static library packaging and publishing (d5b13a5,86c2696). - 4-Wide SIMD 2D Noise,
fade5LUT & VLA-Free 2D Fast Paths (include/ttypt/chaff.h,include/ttypt/noise.h,npm/include/ttypt/*,tests/test_chaff.c): - Added 4-wide SIMD (
__wasm_simd128__with bit-exact scalar fallback) 2D evaluation APIs ininclude/ttypt/chaff.h:chaff_rot2d_i32_q15_4x(),chaff_wpoint_periodic_2d_4x(),chaff_fbm_rotated_2d_4x(),chaff_fbm_rotated_2d_step_q12_4_4x(), andchaff_grad_noise2d_4x(). - Added branchless 4-byte XXH32 helpers (
noise_pack2,noise_hash2_1,noise_hash2_v128,noise_hash2_4x), 512-entry quintic fade LUT (s_noise_fade5_q16_lut) acceleratingnoise_wfade5(), and 4-wide SIMD/scalar primitives (noise_wfade5_v128,noise_wfade5_4x,noise_wstep_v128,noise_wstep_v128_u24,noise_wstep_4x,noise_wpoint_2d_4x) ininclude/ttypt/noise.h. - Added VLA-free
dim == 2fast paths innoise_get_v()andnoise_wpoint_c()(include/ttypt/noise.h) eliminating stack VLAs for 2D noise and FBM. - Added bit-exact scalar-vs-4x parity tests in
tests/test_chaff.c. - Thread-Local 4-Corner Lattice Cell Caching (
include/ttypt/chaff.h,npm/include/ttypt/chaff.h): - Added 4-corner cell caching to
chaff_wpoint_periodic_2d_ex()/chaff_wpoint_periodic_2d_4x()and per-octave cell caching (CHAFF_FBM_MAX_OCTAVES = 8) tochaff_fbm_rotated_2d(), reusing evaluated quad corner hashes whenever successive queries land inside the same(cell_x, cell_y, shift, period_shift, seed)lattice cell. - Qualified noise cell caches with portable thread-local storage (
_CHAFF_TLS/__declspec(thread)/__thread/_Thread_local) so concurrent worker threads (stele_wq) evaluate periodic and rotated FBM noise with zero data races.
Changed
- Layer-0
libstele/mkMigration & Portable Make Modernization (Makefile,.github/workflows/ci.yml): - Declared
WASM_GLOBAL_BASEdirectly inMakefile, adopted declarativeTESTS=and portable link variables, migrated toinclude ttypt/include.mkvia Make search paths, dropped legacy../mkfallback, eliminated duplicate$(shell)/!=forks, and ported Makefiles to OpenBSD + GNU Make (b4ff02d,cac6a43,3007788,a9b844e,8625636,da6bee6,a99f6b9,a1f8f3a).
[1.1.0] - 2026-11-16
Added
- Periodic Tiling, Domain Skew & 4D Slice Stepping (
include/ttypt/chaff.h,include/ttypt/noise.h,include/ttypt/chaff_glsl.h): - Wired
period_shiftandskew[2]across point samplers (noise_wpoint_n_periodic), corner caches (noise_wcorners_periodic), analytical 2D/3D/4D gradient samplers (chaff_sample_grad_2d,chaff_sample_grad_3d,chaff_sample_grad_4d), and GLSL shader contracts (chaff_glsl.h). - Added bulk 2D slice stepper across 4D fields (
chaff_fill_slice_4d) pre-collapsing invariant $W$ and $Z$ axes once per 4D cell in registers. - Added struct-driven rotated FBM accumulator (
chaff_fbm_opts_t,chaff_fbm_rotated_2d), periodic 2D sampler options (chaff_periodic_opts_t,chaff_sample_periodic_2d_opts), banded 2D curl flow (chaff_eval_flow_2d_banded), and 3D Ekman spiral atmospheric wind shear. - Universal 7-OS & NPM CI Pipeline (
.github/workflows/ci.yml,Makefile): - Migrated
Makefiletoinclude ../mk/include.mkand added.github/workflows/ci.ymlpublishinglibchaffacrossdeb,apk,rpm,pacman,brew,openbsd,wingetand@tty-pt/chaffto npm withlinux-x64,darwin-arm64,darwin-x64,win32-x64N-API prebuilds andchaff.wasm.
Changed
- Linked
chaff.wasm/noise.wasmwith shared memory and the@tty-pt/stelesingle-allocator substrate (>=1.7.0/^1.7.0).
[1.0.0] - 2026-11-11
Added
- Generic zero-magic-constant
<ttypt/chaff.h>,<ttypt/noise.h>, and<ttypt/chaff_glsl.h>headers. - Continuous Nyquist cutoff derivation from sampling stride (
chaff_nyquist_shift_q16,chaff_fill_lod). - Parameterized monotonic fractal amplitude scaling (
chaff_octave_amplitude_ex), periodic 2D domain sampling (chaff_wpoint_periodic_2d), fixed-point 2D rotation (chaff_rot2d_q15,chaff_rot2d_i32_q15), rotated FBM accumulator (chaff_fbm_rotated_2d_q12_4), and declarativeCHAFF_LAYER_RIDGEDlayer flag. - Shared library (
libchaff.so), WebAssembly module (chaff.wasm), and universal@tty-pt/chaffNode.js/Browser package underBSD-2-Clause.