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.
Extends
Section titled “Extends”TgpuFragmentFnShellHeader<TIn,TOut>
Type Parameters
Section titled “Type Parameters”Call Signature
Section titled “Call Signature”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
Parameters
Section titled “Parameters”implementation
Section titled “implementation”(input, out) => InferIO<TOut>
Returns
Section titled “Returns”TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>
Call Signature
Section titled “Call Signature”TgpuFragmentFnShell(
implementation):TgpuFragmentFn<CleanIO<TIn>,CleanIO<TOut>>
Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:97
Parameters
Section titled “Parameters”implementation
Section titled “implementation”string
Raw WGSL function implementation with header and body
without fn keyword and function name
e.g. "(x: f32) -> f32 { return x; }";
Returns
Section titled “Returns”TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>
Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”strings
Section titled “strings”TemplateStringsArray
values
Section titled “values”…unknown[]
Returns
Section titled “Returns”TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>
Properties
Section titled “Properties”entryPoint
Section titled “entryPoint”
readonlyentryPoint:"fragment"
Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:58
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.entryPoint
readonlyin:TIn|undefined
Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:55
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.in
readonlyout:TOut
Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:56
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.out
returnType
Section titled “returnType”
readonlyreturnType:IOLayoutToSchema<TOut>
Defined in: packages/typegpu/src/core/function/tgpuFragmentFn.ts:57
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.returnType