Channel Shuffle
Builds a texture by picking each color channel from one of up to four input textures.
Outputs
| Name | Type | Description |
|---|---|---|
| Texture Output | Texture | The assembled texture. |
Inputs
Parameters
| Name | Type | Description |
|---|---|---|
| Output Format | Enum | Which 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 Type | Enum | The channels of the output texture. Follows an input unless the output format is Manual.Choices: R (u8), RG (u8), RGBA (u8) |
| Texture Size | Vector 2 Int | The size of the output texture in pixels. Follows an input unless the output format is Manual. |
| Red Input | Int | Which input the red channel is taken from, counting from 0 for A to 3 for D. |
| Red Channel | Enum | Which channel of that input becomes red, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1 |
| Green Input | Int | Which input the green channel is taken from, counting from 0 for A to 3 for D. |
| Green Channel | Enum | Which channel of that input becomes green, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1 |
| Blue Input | Int | Which input the blue channel is taken from, counting from 0 for A to 3 for D. |
| Blue Channel | Enum | Which channel of that input becomes blue, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1 |
| Alpha Input | Int | Which input the alpha channel is taken from, counting from 0 for A to 3 for D. |
| Alpha Channel | Enum | Which 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