Skip to content

TgpuFragmentFnShell

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:78

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

  • TgpuFragmentFnShellHeader<TIn, TOut>

TIn extends In = In

TOut extends Out = Out

TgpuFragmentFnShell(implementation): TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:89

Creates a type-safe implementation of this signature

(input, out) => InferIO<TOut>

TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>

TgpuFragmentFnShell(implementation): TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:101

string

Raw WGSL function implementation with header and body without fn keyword and function name e.g. "(x: f32) -> f32 { return x; }";

TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>

TgpuFragmentFnShell(strings, …values): TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:102

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

TemplateStringsArray

…unknown[]

TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>

readonly entryPoint: "fragment"

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:62

TgpuFragmentFnShellHeader.entryPoint


readonly in: TIn | undefined

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:59

TgpuFragmentFnShellHeader.in


readonly out: TOut

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:60

TgpuFragmentFnShellHeader.out


readonly returnType: IOLayoutToSchema<TOut>

Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:61

TgpuFragmentFnShellHeader.returnType

© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.