Skip to main content
Version: 5.x

Nodes > Functions > Channels > Swizzle

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

NameTypeDescription
AfloatValue to be swizzled

Outputs

NameTypeDescription
AfloatValue after swizzling

Properties

NameTypeDescription
SwizzlestringFormat for the output value. Valid characters: x, y, z, w, r, g, b, a, 0, 1
Was this page helpful?
Yes
No