Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.

Bindings

sim_params

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

particle_buffer

#
@group(1)
@binding(0)
var<storage, read_write> particle_buffer: ParticleBuffer

indirect_buffer

#
@group(1)
@binding(1)
var<storage, read_write> indirect_buffer: IndirectBuffer

parent_particle_buffer

#
Active when
READ_PARENT_PARTICLE
@group(1)
@binding(2)
var<storage, read> parent_particle_buffer: ParentParticleBuffer

spawners

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

prefix_sum

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

batch_info

#
@group(2)
@binding(2)
var<storage, read> batch_info: BatchInfo

effect_metadatas

#
@group(3)
@binding(0)
var<storage, read_write> effect_metadatas: array<EffectMetadata>

child_info_buffer

#
Active when
CONSUME_GPU_SPAWN_EVENTS
@group(3)
@binding(1)
var<storage, read> child_info_buffer: ChildInfoBuffer

event_buffer

#
Active when
CONSUME_GPU_SPAWN_EVENTS
@group(3)
@binding(2)
var<storage, read> event_buffer: EventBuffer

Structures

Particle

#
struct Particle {
particles: array<Particle>,
}

ParentParticle

#
struct ParentParticle {
particles: array<ParentParticle>, READ_PARENT_PARTICLE
}

EffectLocation

#

Location of an effect in a slab.

struct EffectLocation {
effect_index: u32,
base_particle: u32,
update_index: u32,
}

Functions

find_location_from_particle

#

Requirements: - var batch_info : BatchInfo - var prefix_sum : array

fn find_location_from_particle (
slab_particle_index: u32
) -> EffectLocation

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
fn main (
@builtin(global_invocation_id)
global_invocation_id: vec3<u32>
)
Contents