Microsoft DirectX 8.0 (Visual Basic) |
There are two main categories of operations understood by the Direct3DX compiler for the pixel shader: pixel color and alpha blending operations and texture addressing operations. The assembler represents these operations using instructions. Pixel color and alpha blending operations modify color data, and texture addressing operations affect and process texture coordinate data. All of the pixel shader instructions are performed on a per-pixel basis—that is, they have no knowledge of other pixels in the pipeline.
The blending operations can be used for independent processing of RGB color and scalar alpha. In most cases, pixel blending (color or alpha) operations can support both a color and an alpha instruction in one slot.
Implementations must support programs of at least eight blending instructions and four addressing instructions to be compliant.
Texture addressing operations each consume one slot, but pixel blending (color and alpha) operations can be paired to enable both a color and a alpha instruction in a single slot. In Microsoft® DirectX® 8.0, the texture addressing instructions must precede the color blending instructions.
The syntax for texture address perturbation operation is included within the shader program itself in the form of texture declarations. These control how address perturbation operations are applied to the color values sampled from the textures during their pre-loading into the temporary register file for use in the body of the pixel shader.