Channel Shuffle
Builds a texture by picking each of its channels from a channel of an input, or setting it to 0 or 1.
Outputs
| Name | Type | Description |
|---|---|---|
| Output | Texture | The assembled texture. |
Inputs
| Name | Type | Description |
|---|---|---|
| Inputslist | Texture | The textures the channels are taken from, each stretched over the whole output. Connecting to the list adds an input at the end. |
Parameters
| Name | Type | Description |
|---|---|---|
| Mode | Enum | Whether every channel comes from the first input, or each channel says which input it comes from.Choices: Single Input, Multiple Inputs |
| Red Source | Enum | Which of the connected inputs the red channel is taken from. Only present in Multiple Inputs mode. |
| Red Channel | Enum | Which channel of that input becomes red, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1 |
| Green Source | Enum | Which of the connected inputs the green channel is taken from. Only present in Multiple Inputs mode. |
| Green Channel | Enum | Which channel of that input becomes green, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1 |
| Blue Source | Enum | Which of the connected inputs the blue channel is taken from. Only present in Multiple Inputs mode. |
| Blue Channel | Enum | Which channel of that input becomes blue, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1 |
| Alpha Source | Enum | Which of the connected inputs the alpha channel is taken from. Only present in Multiple Inputs mode. |
| Alpha Channel | Enum | Which channel of that input becomes alpha, or a fixed 0 or 1.Choices: Red, Green, Blue, Alpha, 0, 1 |
| Size | Enum | Where the size of the output comes from. Largest and Smallest take it from the inputs, Custom from Resolution. Only present in Multiple Inputs mode.Choices: Largest, Smallest, Custom |
| Resolution | Vector 2 Int | The width and height of the output in pixels. Only present when Size is Custom. |
| Filteradvanced | Enum | How an input of another size is read between its pixels. Nearest keeps hard pixels, and both Linear choices blend them.Choices: Nearest, Linear Fast, Linear Nice |
| Formatadvanced | Enum | The pixel format of the output. Auto has the fewest channels that hold the result, at the precision of the inputs. |
The Channel Shuffle operator builds a texture channel by channel, taking each channel from a channel of an input or setting it to 0 or 1. Use it to swap red and blue, to make a texture opaque, or to put the gray of one texture into the alpha of another.
In Single Input mode, every channel comes from the first input, and the output has its size. In Multiple Inputs mode, each channel also picks the input it comes from.
A gray texture reads the same in red, green and blue, and its alpha reads 1. Removing an input moves the ones after it up by one, and a channel that pointed at the removed one reads 0 until it is set again.
Keywords: swizzle, channels, rgba, combine, split, alpha, pack, mask, reorder, swap