iOS reference / SwiftUICore / ShaderFunctionSwiftUICore · IOS API REFERENCE
ShaderFunction struct · iOS 17.0+ · SDK 27.1
@dynamicCallable struct ShaderFunctionA reference to a function in a Metal shader library.
Members (6) method · iOS 17.0+ dynamicallyCall TypeScript dynamicallyCall(args: Array<Shader_Argument>): ShaderSwift declaration func dynamicallyCall(withArguments args: [Shader.Argument]) -> ShaderReturns a new shader by applying the provided argument values
to the referenced function.
Typically this subscript is used implicitly via function-call
syntax, for example:
let shader = ShaderLibrary.default.myFunction(.float(42))
which creates a shader passing the value `42` to the first
unbound parameter of `myFunction()`.
get · iOS 17.0+ name TypeScript get name(): stringSwift declaration var name: StringThe name of the shader function in the library.
set · iOS 17.0+ name TypeScript set name(value: string)Swift declaration var name: StringThe name of the shader function in the library.
init · iOS 17.0+ init TypeScript static init(library: ShaderLibrary, name: string): ShaderFunctionSwift declaration init(library: ShaderLibrary, name: String)Creates a new function reference from the provided shader
library and function name string.
get · iOS 17.0+ library TypeScript get library(): ShaderLibrarySwift declaration var library: ShaderLibraryThe shader library storing the function.
set · iOS 17.0+ library TypeScript set library(value: ShaderLibrary)Swift declaration var library: ShaderLibraryThe shader library storing the function.
Skipped declarations No declarations were skipped in this snapshot.
All SwiftUICore types →