diff options
| author | yum <yum.food.vr@gmail.com> | 2025-07-27 18:23:02 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-07-27 18:23:02 -0700 |
| commit | 1b918bf7f834735669a309d537e0f8d0794c05eb (patch) | |
| tree | fcf21a154e659ff6626d0d99355ac93cd3f43c7e /README.md | |
| parent | e2a4127a78b72a9b4405017e9a9e2f2c41d89493 (diff) | |
Add fft shader
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ed5a42 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +## FFT on the GPU + +This is an optimized GPU-based 2D FFT for VRChat. It is only suitable for use +in worlds. + +### Quick start + +Run CPU simulator: + +```bash +$ cmake .. && cmake --build . && ./gpu_fft +``` + +Generate twiddle factor tables: + +```bash +$ python3 ./generate_twiddle_tables.py +``` + +### Overview + +`gpu_fft.cc` is a CPU simulator achieving high performance. It compares the GPU +algorithm against a simple radix-2 algorithm, demonstrating agreement within +some modest epsilons. Because higher radix FFTs do more sequential adds than +lower ffts, there is substantial error. In exchange, higher radices let you +compute FFTs with a shorter CRT chain. + +`generate_twiddle_tables.py` generates precomputes twiddle factors. +`DFT_MATRIX` corresponds to `ShaderUniforms.twiddle_factors` in the simulator +and `STAGE_TWIDDLES` corresponds to `ShaderUniforms.stage_twiddles`. + |
