class openfl.display.Shader

Class Fields

static var aColor:Attrib

Attribute (vec4) with the tint and alpha values of the object.

static var aPosition:Attrib

Attribute (vec2) with the object position.

static var aTexCoord:Attrib

Attribute (vec2) with the object texture coordinate.

static var uColorMultiplier:Uniform

Uniform (vec4) holding the colorMultiplier values from the transfrom.colorTransform of the object.

static var uColorOffset:Uniform

Uniform (vec4) holding the colorOffset values from the transfrom.colorTransform of the object.

static var uObjectSize:String

Uniform (vec2) holding the object width and height. If it's used with Tilesheet.drawTiles() the value will be [0, 0] For example, if the object is 200x200, the value of this uniform will be 200x200.

static var uProjectionMatrix:Uniform

Uniform (mat4) holding the projection matrix.

static var uSampler:Uniform

Uniform (sampler2D) holding the object texture.

static var uTextureSize:String

Uniform (vec2) holding the object texture real width and height. If it's used with Tilesheet.drawTiles() the value will be [0, 0] For example, if the object is 200x200, the value of this uniform will be 256x256.

static var vColor:Varying

Varying (vec4) with the tint and alpha values of the object.

static var vTexCoord:Varying

Varying (vec2) with the object texture coordinate.

Instance Fields

var blendMode:BlendMode

Overrides the object blendMode property. By default: Null (not overriden)

var precision:GLShaderPrecision

The shader precision. It can be HIGH, MEDIUM or LOW. Defaults to MEDIUM

var repeatX:RepeatMode

Overrides the default repetition applied to the object's bitmap or cached bitmap. By default: NONE

var repeatY:RepeatMode

Overrides the default repetition applied to the object's bitmap or cached bitmap. By default: NONE

var smooth:Null<Bool>

Overrides the default smooth applied to the object's bitmap or cached bitmap. By default: Null (not overriden)

function new(?precision:GLShaderPrecision): Void