Instance Property

attributeValues

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

Declaration

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

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

Taking Full Control of Particle Drawing with a Shader

Getting Started with Particle Shaders

Provide custom shader code to alter a particle's look.

var shader: SKShader?

A custom shader used to determine how particles are rendered.

func setValue(SKAttributeValue, forAttribute: String)

Sets an attribute value for an attached shader.