Initial commit
This commit is contained in:
14
shaders/copyBuffer.wgsl
Normal file
14
shaders/copyBuffer.wgsl
Normal file
@@ -0,0 +1,14 @@
|
||||
@group(0) @binding(0)
|
||||
var<storage, read> indices: array<u32>;
|
||||
|
||||
@group(0) @binding(1)
|
||||
var<storage, read_write> sortedIndices: array<u32>;
|
||||
|
||||
@compute @workgroup_size(64)
|
||||
fn computeMain(@builtin(global_invocation_id) globalInvocationId: vec3<u32>) {
|
||||
|
||||
let particleIndex = globalInvocationId.x;
|
||||
|
||||
sortedIndices[particleIndex] = indices[particleIndex];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user