fft_resolve.wgsl
Constants
FFT_RESOLUTION
#LOD_COUNT
#ATTENUATION_BINS
#NO_BED_DEPTH
#Bindings
height_x
#@group(0)
@binding(0)
var
height_x:
texture_2d_array<f32>
z_field
#@group(0)
@binding(1)
var
z_field:
texture_2d_array<f32>
bed_height
#@group(0)
@binding(2)
var
bed_height:
texture_2d<f32>
output
#@group(0)
@binding(3)
var
output:
texture_storage_2d_array<rgba16float, write>
fft
#Structures
CascadeParams
#CascadeLayout
#
struct
CascadeLayout
{
}
FftUniform
#Functions
bed_water_depth
#shoaling_weights
#resolve
#
@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
Water depth under the sea level from the game’s bed height map. Outside the mapped area (or with no map at all) the sample keeps the deep default, mirroring a full-depth capture texel. Nearest-texel read: the shoaling profile is smooth enough that one bed texel per cascade texel suffices.