TgpuFragmentFnShell
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”TgpuFragmentFnShell(
implementation):TgpuFragmentFn<CleanIO<TIn>,CleanIO<TOut>>
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”implementation
Section titled “implementation”(input, out) => InferIO<TOut>
Returns
Section titled “Returns”TgpuFragmentFn<CleanIO<TIn>, CleanIO<TOut>>
Defined in
Section titled “Defined in”packages/typegpu/src/core/function/tgpuFragmentFn.ts:99
TgpuFragmentFnShell(
implementation):TgpuFragmentFn<CleanIO<TIn>,CleanIO<TOut>>
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”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>>
Defined in
Section titled “Defined in”packages/typegpu/src/core/function/tgpuFragmentFn.ts:111
TgpuFragmentFnShell(
strings, …values):TgpuFragmentFn<CleanIO<TIn>,CleanIO<TOut>>
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>>
Defined in
Section titled “Defined in”packages/typegpu/src/core/function/tgpuFragmentFn.ts:114
Properties
Section titled “Properties”entryPoint
Section titled “entryPoint”
readonlyentryPoint:"fragment"
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.entryPoint
Defined in
Section titled “Defined in”packages/typegpu/src/core/function/tgpuFragmentFn.ts:73
readonlyin:undefined|TIn
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.in
Defined in
Section titled “Defined in”packages/typegpu/src/core/function/tgpuFragmentFn.ts:70
readonlyout:TOut
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.out
Defined in
Section titled “Defined in”packages/typegpu/src/core/function/tgpuFragmentFn.ts:71
returnType
Section titled “returnType”
readonlyreturnType:IOLayoutToSchema<TOut>
Inherited from
Section titled “Inherited from”TgpuFragmentFnShellHeader.returnType