Source Register Swizzling
Before an instruction runs, the data in a source register is copied to a temporary register. Swizzling refers to the ability to copy any source register component to any temporary register component. Swizzling does not affect the source register data.
As shown in the following table, swizzling can be applied to the individual components of the source register data (where r is one of the valid vertex shader input Registers - vs_1_1).
- All four components are always copied. If fewer than four components are specified, the last component is repeated (xy means .xyyy). If no components are specified, x is repeated (.xxxx).
- The components can appear in any order. v0.ywx results in v0.ywxx.
- The rgba components can be used respectively for xyzw (r for x, g for b, etc.).
- These instructions implement source-register single component swizzles: exp, expp, log, logp, pow, rcp, rsq. The result of these instructions is copied to all four destination register components.