Type Method

uniformWithName:texture:

Creates and initializes a new uniform object that holds a reference to a texture.

Declaration

+ (instancetype)uniformWithName:(NSString *)name texture:(SKTexture *)texture;

Parameters

name

The name used to identify the uniform variable; you use this name inside your shader to read the uniform variable’s value.

texture

The initial texture to use for the uniform variable.

Return Value

A newly initialized uniform object whose type is set to SKUniformTypeTexture.

See Also

Creating and Initializing Uniform Objects

+ uniformWithName:

Creates and initializes a new uniform object.

+ uniformWithName:float:

Creates and initializes a new uniform object that holds a floating-point number.

+ uniformWithName:floatVector2:

Creates and initializes a new uniform object that holds a vector of two floating-point numbers.

Deprecated
+ uniformWithName:floatVector3:

Creates and initializes a new uniform object that holds a vector of three floating-point numbers.

Deprecated
+ uniformWithName:floatVector4:

Creates and initializes a new uniform object that holds a vector of four floating-point numbers.

Deprecated
+ uniformWithName:floatMatrix2:

Creates and initializes a new uniform object that holds a 2 x 2 matrix of floating-point numbers.

Deprecated
+ uniformWithName:floatMatrix3:

Creates and initializes a new uniform object that holds a 3 x 3 matrix of floating-point numbers.

Deprecated
+ uniformWithName:floatMatrix4:

Creates and initializes a new uniform object that holds a 4 x 4 matrix of floating-point numbers.

Deprecated
- initWithName:

Initializes a new uniform object.

- initWithName:float:

Initializes a new uniform object that holds a floating-point number.

- initWithName:floatVector2:

Initializes a new uniform object that holds a vector of two floating-point numbers.

Deprecated
- initWithName:floatVector3:

Creates and initializes a new uniform object that holds a vector of three floating-point numbers.

Deprecated
- initWithName:floatVector4:

Initializes a new uniform object that holds a vector of four floating-point numbers.

Deprecated
- initWithName:floatMatrix2:

Initializes a new uniform object that holds a 2 x 2 matrix of floating-point numbers.

Deprecated
- initWithName:floatMatrix3:

Initializes a new uniform object that holds a 3 x 3 matrix of floating-point numbers.

Deprecated
- initWithName:floatMatrix4:

Initializes a new uniform object that holds a 4 x 4 matrix of floating-point numbers.

Deprecated
- initWithName:texture:

Initializes a new uniform object that holds a reference to a texture.