Channel Shuffle

Builds a texture by picking each color channel from one of up to four input textures.

Outputs

NameTypeDescription
Texture OutputTextureThe assembled texture.

Inputs

NameTypeDescription
Texture Input ATextureThe first source. Any input with nothing connected counts as black.
Texture Input BTextureThe second source.
Texture Input CTextureThe third source.
Texture Input DTextureThe fourth source.

Parameters

NameTypeDescription
Output FormatEnumWhich input the output takes its size and type from, or Manual for the settings below.Choices: Copy Input A, Copy Input B, Copy Input C, Copy Input D, Manual
Texture TypeEnumThe channels of the output texture. Follows an input unless the output format is Manual.Choices: R (u8), RG (u8), RGBA (u8)
Texture SizeVector 2 IntThe size of the output texture in pixels. Follows an input unless the output format is Manual.
Red InputIntWhich input the red channel is taken from, counting from 0 for A to 3 for D.
Red ChannelEnumWhich channel of that input becomes red, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1
Green InputIntWhich input the green channel is taken from, counting from 0 for A to 3 for D.
Green ChannelEnumWhich channel of that input becomes green, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1
Blue InputIntWhich input the blue channel is taken from, counting from 0 for A to 3 for D.
Blue ChannelEnumWhich channel of that input becomes blue, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1
Alpha InputIntWhich input the alpha channel is taken from, counting from 0 for A to 3 for D.
Alpha ChannelEnumWhich channel of that input becomes alpha, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1

Channel Shuffle takes the output texture apart into its four channels and says where each one comes from. For every output channel there are two choices: which of the four inputs to read, and which channel of that input to take. A channel can also be set to a fixed 0 or 1 instead of coming from an input.

That makes it the tool for moving channels between textures. Taking red, green and blue from one input and alpha from the red channel of another uses a gray texture as a transparency mask. Taking every channel from the red channel of one input spreads a single channel over the whole image. Setting alpha to 1 makes any texture fully opaque.

An input with nothing connected counts as black, so a channel taken from it is 0.

Keywords: swizzle, channels, rgba, combine, split, alpha, pack