Skip to content

TgpuFragmentFnShell

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

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:85

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:97

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:98

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:58

TgpuFragmentFnShellHeader.entryPoint


readonly in: TIn | undefined

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

TgpuFragmentFnShellHeader.in


readonly out: TOut

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

TgpuFragmentFnShellHeader.out


readonly returnType: IOLayoutToSchema<TOut>

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

TgpuFragmentFnShellHeader.returnType