Contents

dynamicallyCall(withArguments:)

Returns a new shader by applying the provided argument values to the referenced function.

Declaration

func dynamicallyCall(withArguments args: [Shader.Argument]) -> Shader

Discussion

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().

See Also

Configuring a function