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.

particle.wgsl

Import path

Bindings

particle_behaviors

#
@group(3)
@binding(7)
var<storage, read_write> particle_behaviors: array<ParticleBehavior>

Structures

ParticleBehavior

#
struct ParticleBehavior {
@location(0)
indicies: vec4<i32> ,
@location(1)
velocity: vec4<f32> ,
@location(2)
acceleration: vec4<f32> ,
@location(3)
jerk: vec4<f32> ,
}

Functions

apply_particle_behaviors

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(32, 32)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn apply_particle_behaviors (
@builtin(local_invocation_id)
gl_LocalInvocationID: vec3<u32>
@builtin(global_invocation_id)
gl_GlobalInvocationID: vec3<u32>
)