Skip to main content

Pass

Description:

  A record representing a shader pass.

Class Object: Pass Class.

Inherits from: Object.

grabPass

Type: Field.

Description:

  Whether this Pass should be a grab pass. A grab pass will render a portion of game scene into a texture frame buffer. Then use this texture frame buffer as an input for next render pass.

Signature:

grabPass: boolean

set

Type: Function.

Description:

  A function that sets the values of shader parameters.

Signature:

set: function(self: Pass,
name: string,
var1: number,
var2?: number --[[0]],
var3?: number --[[0]],
var4?: number --[[0]])

Parameters:

ParameterTypeDescription
namestringThe name of the parameter to set.
var1numberThe first numeric value to set.
var2number[optional] An optional second numeric value to set (default is 0).
var3number[optional] An optional third numeric value to set (default is 0).
var4number[optional] An optional fourth numeric value to set (default is 0).

set

Type: Function.

Description:

  Another function that sets the values of shader parameters. Works the same as: pass:set("varName", color.r / 255.0, color.g / 255.0, color.b / 255.0, color.opacity)

Signature:

set: function(self: Pass, name: string, var: Color)

Parameters:

ParameterTypeDescription
namestringThe name of the parameter to set.
varColorThe Color object to set.