Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

vfx_indirect.wgsl

Bindings

sim_params

#
@group(0)
@binding(0)
var<uniform> sim_params: SimParams

effect_metadata_buffer

#
@group(1)
@binding(0)
var<storage, read_write> effect_metadata_buffer: array<u32>

dispatch_indirect_buffer

#
@group(1)
@binding(1)
var<storage, read_write> dispatch_indirect_buffer: array<DispatchIndirectArgs>

draw_indirect_buffer

#
@group(1)
@binding(2)
var<storage, read_write> draw_indirect_buffer: array<u32>

spawner_buffer

#
@group(2)
@binding(0)
var<storage, read_write> spawner_buffer: array<Spawner>

prefix_sum

#
@group(2)
@binding(1)
var<storage, read_write> prefix_sum: array<u32>

child_info_buffer

#

Shader defs requirments:

🟢 HAS_GPU_SPAWN_EVENTS

@group(3)
@binding(0)
var<storage, read_write> child_info_buffer: ChildInfoBuffer

Functions

main

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(64)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1

This is invoked once per instance, with the global invocation ID indexing the list of spawners, which is re-uploaded each frame so is guaranteed to be a tightly packed array with exactly the number of

fn main (
@builtin(global_invocation_id)
global_invocation_id: vec3<u32>
)