The output registers are where your vertex shader will place its results for further processing down the pipeline. The output registers are write-only, and have a letter-‘o’ prefix for “output”. Only the output position registers have to be written to by the vertex shader, the others are optional.
The oPos register consists of one four element floating-point vector that is expected to contain the vertex position in homogenous clip space coordinates. The vertex shader must write to the output position register.
The output data registers are two four element floating-point vectors, and are typically used to hold the diffuse (oD0) and specular (oD1) color values generated from the shader. Both of these registers are (possibly) interpolated between the vertices of the triangle before being passed to the pixel shader as color register v0 and v1.
If you are also using a pixel shader, then there is absolutely no reason that these values have to be color values. If you want to pass one or two 4-element vectors to your pixel shader, then the output destination registers are the way you’d do it. As long as the pixel shader generates some color value as output, it doesn’t have to come from the vertex data.
There are eight texture-coordinate registers represented as eight four-element floating-point vectors. They should contain the texture-coordinates to be used by the pipeline for this vertex.
Write only as many register elements as there are texture coordinates in the input texture map. For example, for a 2D texture you would only write to the .xy elements using a swizzle or a mask. When texture projection is enabled you’ll need to write to all elements of the texture register.
You should not select the D3DTTFF_PROJECTED flag when using the programmable pipeline. This flag instructs the pipeline to divide all the elements by the last element (a perspective divide in the hardware) before rasterization takes place and is intended to be used as part of the FFP for projected textures.
Texture coordinates for a singly tiled texture will usually be in the range [0,1]. If you are tiling a large area, you might run into a situation where your texture coordinates run into large multiples of this range. This limit can be found for a particular device by examining the MaxTextureRepeat member of the D3DCAPS8 structure. Note that the MaxTextureRepeat value’s interpretation is affected by the D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE capability bit.
However, if the texture coordinates are to be read by a pixel shader using the texcoord or texcrd instructions, then the texture coordinate range depends on the instruction and the pixel shader version since the pixel shader registers have less precision than the vertex shader registers.