gled 2.8.1

gled is an application for creating animations and effects on artnet or wled light installations
1
2
3
4
5
6
7
8
9
10
11
12
13
@group(0) @binding(0)
// 2 bytes per pixel. Resolution: 1024*1024.
// Each row has 1024*2 = 2048 bytes.
// As it is indexed as u32, each row has 512 entries in the array
var<storage, read_write> indices: array<u32, 2097152>; 

const TEXTURE_SIZE_U: u32 = 2048u;

@compute
@workgroup_size(1)
fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
    indices[global_id.y * (TEXTURE_SIZE_U / 2u) + global_id.x] = 0xffffffffu;
}