anim_waves.wgsl
Constants
LOD_COUNT
#CASCADE_COUNT
#WAVE_COUNT
#TAU
#PI
#NO_BED_DEPTH
#Bindings
output
#@group(0)
@binding(0)
var
output:
texture_storage_2d_array<rgba16float, write>
params
#bed_height
#@group(0)
@binding(2)
var
bed_height:
texture_2d<f32>
Structures
CascadeParams
#CascadeLayout
#
struct
CascadeLayout
{
}
GerstnerWave
#AnimWavesUniform
#
struct
AnimWavesUniform
{
}
Functions
bed_water_depth
#shoaling_weights
#A bounded finite-depth shoaling profile. The vertical lane retains more energy than horizontal chop through the breaker zone, producing steeper near-shore crests without changing deep-water phase or world anchoring.
generate
#
@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 5 m-class bed texel suffices.