Color.Swizzle

Description

Name

struct Tinman.Color.Swizzle

Used by

Heightmap.Channels.swizzle / Pyramid.Channels.swizzle

Specifies a color channel swizzle operation.

The following color channel identifiers may be used:

0 : constant color channel value 0,
1 : the red channel of the input color,
2 : the green channel of the input color,
3 : the blue channel of the input color,
4 : the alpha channel of the input color,
5 : constant color channel value 1.

To invert an input color channel, specify the negative value of its identifier.

Fields / Optional

red

Type

number

Default

1

The color channel identifier to use for the red output channel.


green

Type

number

Default

2

The color channel identifier to use for the green output channel.


blue

Type

number

Default

3

The color channel identifier to use for the blue output channel.


alpha

Type

number

Default

4

The color channel identifier to use for the alpha output channel.