Macro shades::sw [−][src]
Swizzle macro.
This macro allows to swizzle expressions to yield expressions reorganizing the vector attributes. For instance,
sw!(color, .rgbr)
will take a 4D color and will output a 4D color for which the alpha channel is overridden with
the red channel.
The current syntax allows to extract and construct from a lot of types. Have a look at Swizzlable
for a
comprehensive list of what you can do.