preprocess_depth.wgsl

Bindings
@group(0)
@binding(0)
var
input_depth:
texture_depth_2d
@group(0)
@binding(1)
var
preprocessed_depth_mip0:
texture_storage_2d<r16float, write>
@group(0)
@binding(2)
var
preprocessed_depth_mip1:
texture_storage_2d<r16float, write>
@group(0)
@binding(3)
var
preprocessed_depth_mip2:
texture_storage_2d<r16float, write>
@group(0)
@binding(4)
var
preprocessed_depth_mip3:
texture_storage_2d<r16float, write>
@group(0)
@binding(5)
var
preprocessed_depth_mip4:
texture_storage_2d<r16float, write>
Functions
@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
Using 4 depths from the previous MIP, compute a weighted average for the depth of the current MIP