Builtin Library
- ..
- README.md646 B
- bindings.yaml227 B
- shader.wgsl2.6 KB
README.md
compute_fft_stage
One stage of a Stockham auto-sort FFT over vec2<f32> (re, im) data. Used by
nx.gpu.fft1d / nx.gpu.fft2d, invoked log2(N) times per pass (1D = one pass,
2D = row then col), ping-ponging input/output between stages. Generic over a
"line" abstraction so the same shader handles 1D and both 2D passes.
Bindings (see bindings.yaml): input (read), output (read_write) — both
array<vec2<f32>> — and params (read array<f32>).
Usage: dispatch by identity with compute.dispatch("@builtin::shaders.compute_fft_stage", ...) —
it resolves to the shader's stable guid and auto-compiles on first use (no setup).