Instance Property


The values of each attribute associated with the node's attached shader.


var attributeValues: [String : SKAttributeValue] { get set }


All nodes have their own copy of an attribute value and therefore the attribute values can be different across the same SKShader. If instead you need all nodes to share the same value, use SKUniform. Uniforms can change values every frame, but uniforms cannot vary per-node like attributes can.

See Also

Setting a Node's Unique Attributes for a Shader

func setValue(SKAttributeValue, forAttribute: String)

Sets an attribute value for an attached shader

func value(forAttributeNamed: String) -> SKAttributeValue?

The value of a shader attribute.