Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.

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 (
value: vec4<f32>,
twiddle: vec2<f32>
) -> vec4<f32>

butterfly

#
fn butterfly (
index: u32,
stage: u32,
a: vec4<f32>,
b: vec4<f32>
) -> 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
Active when
FFT_VERTICAL
fn main (
@builtin(local_invocation_id)
local: vec3<u32>,
@builtin(workgroup_id)
group: vec3<u32>
)
Active when
!FFT_VERTICAL
fn main (
@builtin(local_invocation_id)
local: vec3<u32>,
@builtin(workgroup_id)
group: vec3<u32>
)
Contents