
GPU Computing 153
mov o0 .w, v2 . x
mov o1 . xyz , v1 . xy zx
ret
// Approximately 4 instruction slots used
LISTING 4.9: The output assembly listing for the vertex shader of
Billboards.hlsl.
The input and output signatures are similar to what we have seen before,
except that the HLSL compiler has taken the liberty to optimize the output.
The
POSITION0 and TEXCOORD0 outputs are stored in the same register,
the position in the first three components (
xyz) and the billboard size in the
last component (
w). When the geometry shader consumes the vertex shader
output, only two registers per vertex are fetched rather than three if the
compiler had decided not to