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 per-node 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

Working with Custom Shaders

shader

Defines a shader which is applied to each tile of the tile map.

- setValue:forAttributeNamed:

Sets an attribute value for an attached shader.

- valueForAttributeNamed:

The value of a shader attribute.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software