Switch
Routes one of its inputs to one of its outputs, chosen by index.
Outputs
| Name | Type | Description |
|---|---|---|
| Output [0, 1, …] | [Data Type] | The outputs to choose between, all of the chosen data type. Output Count sets how many there are. |
Inputs
| Name | Type | Description |
|---|---|---|
| Input [0, 1, …] | [Data Type] | The inputs to choose between, all of the chosen data type. Input Count sets how many there are. |
Parameters
| Name | Type | Description |
|---|---|---|
| Data Type | Enum | What the inputs and outputs carry. The choices are all data types ZigZag knows. |
| Input Count | Int | How many inputs there are, from 1 to 8. |
| Output Count | Int | How many outputs there are, from 1 to 8. |
| Active Input | Int | Which input is passed through, counting from 0. |
| Active Output | Int | Which output receives it, counting from 0. |
| Clear Outputs | Bool | Whether the outputs that are not active are emptied. |
Switch routes data from one of its inputs to one of its outputs. All inputs and outputs carry the same data type, and two indices pick which input and which output are active. Whatever arrives at the active input is passed on to the active output, unchanged. An index past the last port routes nothing.
Changing a count adds or removes ports at the end, so the other ports keep their connections. Changing the data type replaces every port, and all connections are lost.
With Clear Outputs on, every output except the active one carries nothing. With it off, each output keeps the last thing it received until it is chosen again. With large textures this can cost a lot of memory, because every output holds on to a texture of its own.
Keywords: select, route, multiplexer, choose