Texture.Swizzle

Description

Name

class Tinman.Model.Texture.Swizzle

Derived from

Model.Texture

Swizzles the color channels of this texture.

For each channel of the resulting texture, one of the following swizzle operands may be specified:

  • -5 : use constant minimum value

  • -4 : use inverse alpha channel of input

  • -3 : use inverse blue channel of input

  • -2 : use inverse green channel of input

  • -1 : use inverse red channel of input

  • 0 : use grayscale intensity of input

  • 1 : use red channel of input

  • 2 : use green channel of input

  • 3 : use blue channel of input

  • 4 : use alpha channel of input

  • 5 : use constant maximum value

Fields / Required

source

Type

Model.Texture

Constraint

# != null

The source texture to swizzle.

Fields / Optional

red

Type

number

Constraint

# >= -5 && # <= 5

Default

1

Swizzle operand that outputs the red channel.


green

Type

number

Constraint

# >= -5 && # <= 5

Default

2

Swizzle operand that outputs the green channel.


blue

Type

number

Constraint

# >= -5 && # <= 5

Default

3

Swizzle operand that outputs the blue channel.


alpha

Type

number

Constraint

# >= -5 && # <= 5

Default

4

Swizzle operand that outputs the alpha channel.