Skip to content

Sign up to be notified when the ShaderHunt platform is available, along with interactive examples teaching TypeGPU from the ground up.

TgpuGuardedComputePipeline

TArgs extends number[] = number[]

dispatchThreads(…args): void

Dispatches the pipeline. Unlike TgpuComputePipeline.dispatchWorkgroups(), this method takes in the number of threads to run in each dimension.

Under the hood, the number of expected threads is sent as a uniform, and “guarded” by a bounds check.

TArgs

void

packages/typegpu/src/core/root/rootTypes.ts:96


with(bindGroup): TgpuGuardedComputePipeline<TArgs>

Returns a pipeline wrapper with the specified bind group bound. Analogous to TgpuComputePipeline.with(bindGroup).

TgpuBindGroup

TgpuGuardedComputePipeline<TArgs>

packages/typegpu/src/core/root/rootTypes.ts:86