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

LOD_COUNT

#
const LOD_COUNT: u32 = 5u

Bindings

displacement

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

surface_derivatives

#
@group(0)
@binding(1)
var surface_derivatives: texture_storage_2d_array<rgba16float, write>

fft

#
@group(0)
@binding(2)
var<uniform> fft: FftUniform

Structures

CascadeParams

#
struct CascadeParams {
center: vec2<f32>,
scale: f32,
texture_res: f32,
inv_texture_res: f32,
texel_width: f32,
weight: f32,
max_wavelength: f32,
}

CascadeLayout

#
struct CascadeLayout {
cascades: array<CascadeParams, 6>,
center: vec4<f32>,
bed_transform: vec4<f32>,
bed_range: vec4<f32>,
}

FftUniform

#
struct FftUniform {
cascade_layout: CascadeLayout,
params: vec4<f32>,
mode: vec4<f32>,
}

Functions

resolve_surface

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(8, 8, 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 resolve_surface (
@builtin(global_invocation_id)
id: vec3<u32>
)
Contents