Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

stockham.wgsl

Constants

FFT_RESOLUTION

#
const FFT_RESOLUTION: u32 = 256u

FFT_STAGES

#
const FFT_STAGES: u32 = 8u

Bindings

source_field

#
@group(0)
@binding(0)
var source_field: texture_2d_array<f32>

target_field

#
@group(0)
@binding(1)
var target_field: texture_storage_2d_array<rgba32float, write>

Functions

multiply_pair

#
fn multiply_pair (
twiddle: vec2<f32>
) -> vec4<f32>

butterfly

#
fn butterfly (
index: u32
stage: u32
) -> vec4<f32>

transform

#
fn transform (
local_index: u32
)

main

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(FFT_RESOLUTION, 1, 1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1

Shader defs requirments:

🟢 FFT_VERTICAL

fn main (
@builtin(local_invocation_id)
local: vec3<u32>
@builtin(workgroup_id)
group: vec3<u32>
)

main

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(FFT_RESOLUTION, 1, 1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn main (
@builtin(local_invocation_id)
local: vec3<u32>
@builtin(workgroup_id)
group: vec3<u32>
)