Rework garden simulation pipelines
This commit is contained in:
parent
c2efb33683
commit
018f8c9d4d
67 changed files with 6499 additions and 1682 deletions
|
|
@ -1,11 +1,16 @@
|
|||
struct Agent {
|
||||
position: vec2<f32>,
|
||||
angle: f32,
|
||||
generation: f32,
|
||||
colorIndex: f32,
|
||||
targetPosition: vec2<f32>,
|
||||
targetAngle: f32,
|
||||
introDelay: f32,
|
||||
}
|
||||
|
||||
@group(1) @binding(1) var<storage, read_write> agents: array<Agent>;
|
||||
|
||||
fn get_id(global_id: vec3<u32>, workgroup_count: vec3<u32>) -> u32 {
|
||||
return global_id.x + global_id.y * (workgroup_count.x * 64) + global_id.z * (workgroup_count.x * workgroup_count.y * 64);
|
||||
}
|
||||
const agentWorkgroupSize = __AGENT_WORKGROUP_SIZE__u;
|
||||
|
||||
fn get_id(global_id: vec3<u32>) -> u32 {
|
||||
return global_id.x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue