Contents

setTexture(_:port:)

Binds a Metal texture to a parameter identified by its port address.

Declaration

@discardableResult mutating func setTexture(_ texture: (any MTLTexture)?, port: ComputeNodeGraph.Port.Address) -> Bool

Parameters

  • texture:

    The MTLTexture to bind, or nil to unbind the current texture.

  • port:

    The port address identifying the texture parameter.

Return Value

true if the port was found and the texture was set; false otherwise.