Bindings
@group(0)
@binding(0)
var<uniform>
globals:
Globals
@group(0)
@binding(8)
var<storage, read_write>
view:
View
Structures
Functions
Since the histogram is summed in the compute_average step, there is a limit to the amount of distinct values that can be represented. When using the chosen value of 16, the maximum amount of pixels that can be weighted and summed is 2^32 / 16 = 16384^2.
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(16, 16, 1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(1, 1, 1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
For a given color, return the histogram bin index