Skip to content

TgpuComputeFnShell

TgpuComputeFnShell<ComputeIn>: TgpuComputeFnShellHeader<ComputeIn> & (implementation) => TgpuComputeFn<ComputeIn> & (implementation) => TgpuComputeFn<ComputeIn> & (strings, …values) => TgpuComputeFn<ComputeIn> & object

Describes a compute entry function signature (its arguments, return type and workgroup size). Allows creating tgpu compute functions by calling this shell and passing the implementation (as WGSL string or JS function) as the argument.

does: (implementation) => TgpuComputeFn<ComputeIn> & (implementation) => TgpuComputeFn<ComputeIn>

ComputeIn extends IORecord<AnyComputeBuiltin>

packages/typegpu/src/core/function/tgpuComputeFn.ts:38