Type Method

shaderWithFileNamed:

Creates a new shader object by loading the source for a fragment shader from a file stored in the app’s bundle.

Declaration

+ (instancetype)shaderWithFileNamed:(NSString *)name;

Parameters

name

The name of the fragment shader to load. The file must be present in your app bundle with the same name and a .fsh file extension.

Return Value

A newly initialized shader object whose initial source is loaded from the shader file.

See Also

Creating a Shader

Creating a Custom Fragment Shader

Write a fragment shader using the set of SpriteKit-exposed symbols, and supply it with custom data.

+ shaderWithSource:uniforms:

Creates a new shader object using the specified source and uniform data.

+ shaderWithSource:

Creates a new shader object using the specified source code.

+ shader

Creates a new empty shader object.

- initWithSource:uniforms:

Initializes a new shader object using the specified source and uniform data.

- initWithSource:

Initializes a new shader object using the specified source code.