Instance Property

attributeValues

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

Declaration

@property(nonatomic, copy) NSDictionary<NSString *,SKAttributeValue *> *attributeValues;

Discussion

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

Customizing Stroking or Fill Drawing

Controlling Shape Drawing with Shaders

Change a shape node's appearance by supplying custom shader code.

strokeShader

A custom shader used to determine the color of the stroked portion of the shape node.

fillShader

A custom shader used to determine the color of the filled portion of the shape node.

- setValue:forAttributeNamed:

Sets an attribute value for an attached shader.

- valueForAttributeNamed:

The value of a shader attribute.