/// This code is prepended to gradient/common.wgsl and is specialised for storage buffers struct Gradient { colors: array,16u>, ratios: array, gradient_type: i32, num_colors: u32, interpolation: i32, focal_point: f32, }; @group(3) @binding(1) var gradient: Gradient; fn ratio(i: u32) -> f32 { return gradient.ratios[i]; }