mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 23:41:01 +01:00
13 lines
287 B
WebGPU Shading Language
13 lines
287 B
WebGPU Shading Language
@group(0) @binding(0)
|
|
var image: texture_storage_2d<r64uint, atomic>;
|
|
|
|
@compute
|
|
@workgroup_size(2)
|
|
fn cs_main(@builtin(local_invocation_id) id: vec3<u32>) {
|
|
textureAtomicMax(image, vec2<i32>(0, 0), 1lu);
|
|
|
|
workgroupBarrier();
|
|
|
|
textureAtomicMin(image, vec2<i32>(0, 0), 1lu);
|
|
}
|