Nodes > Functions > Channels > Swizzle
Mixes the input value's channels based on a formatting string.
For example, "xyz" will return a vec3 using the x, y, z values of the input. "xx" will return a vec2 containing the x value of the input twice. "wzyx" will return a vec4 containing the values of the input in reverse order.
"0" and "1" can also be used to place that number in the given slot.
Inputs
Name | Type | Description |
---|---|---|
A | float | Value to be swizzled |
Outputs
Name | Type | Description |
---|---|---|
A | float | Value after swizzling |
Properties
Name | Type | Description |
---|---|---|
Swizzle | string | Format for the output value. Valid characters: x, y, z, w, r, g, b, a, 0, 1 |
Was this page helpful?