fleeting-garden/src/pipelines/agents/agent-generation/agent-schema.wgsl
2026-05-20 21:03:41 +01:00

16 lines
310 B
WebGPU Shading Language

struct Agent {
position: vec2<f32>,
angle: f32,
colorIndex: f32,
targetPosition: vec2<f32>,
targetAngle: f32,
introDelay: f32,
}
@group(1) @binding(1) var<storage, read_write> agents: array<Agent>;
const agentWorkgroupSize = 64u;
fn get_id(global_id: vec3<u32>) -> u32 {
return global_id.x;
}