Instance Method

valueForAttributeNamed:

Sets the value of a shader attribute.

Declaration

- (SKAttributeValue *)valueForAttributeNamed:(NSString *)key;

Parameters

key

The attribute name.

Return Value

An attribute value object containing the scalar or vector value or nil if no such attribute exists.

See Also

Adding a Custom Shader to a Sprite

Applying Shaders to a Sprite

Write custom GLSL code that modifies the look of your sprite.

shader

A text file that defines code that does custom per-pixel drawing or colorization.

attributeValues

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

- setValue:forAttributeNamed:

Sets an attribute value for an attached shader.