foam.wgsl
Constants
NO_BED_DEPTH
#UV_CENTER
#Bindings
source_foam
#@group(0)
@binding(0)
var
source_foam:
texture_2d_array<f32>
source_sampler
#anim_waves
#@group(0)
@binding(2)
var
anim_waves:
texture_2d_array<f32>
waves_sampler
#bed_height
#@group(0)
@binding(4)
var
bed_height:
texture_2d<f32>
target_foam
#@group(0)
@binding(5)
var
target_foam:
texture_storage_2d_array<rgba16float, write>
foam
#fft_surface
#@group(0)
@binding(7)
var
fft_surface:
texture_2d_array<f32>
Structures
CascadeParams
#CascadeLayout
#
struct
CascadeLayout
{
}
FoamUniform
#
struct
FoamUniform
{
}
Functions
world_to_uv
#texel_world
#inside_source
#reproject
#displacement
#jacobian_foam_source
#averaged_foam_source
#bed_water_depth
#update
#main
#
@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
Shader defs requirments:
š¢ FOAM_REPROJECT_PREVIOUS
main
#
@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
Shader defs requirments:
š¢ FOAM_UPDATE_CURRENT
main
#
@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 below sea level. Unmapped samples use the cleared full-depth value.