Microsoft DirectX 8.1 (pixel shader versions 1.0, 1.1, 1.2, 1.3, 1.4) |
Pixel shader versions 1.0, 1.1, 1.2, and 1.3 allow four types of instructions. The instructions must appear in the order shown below.
Pixel shader version 1.4 adds a phase instruction that allows double the number of texture addressing and arithmetic instructions. The shader is separated into phase 1 and phase 2 by a phase marker. Each phase begins with up to six texture instructions, followed by up to eight arithmetic instructions. If a shader does not contain a phase marker, the shader behaves as if all the instructions are phase 2 instructions.
The structure of a pixel shader version 1.4 shader is therefore:
The unfortunate side-effect of the phase transition is that the alpha component of temporary registers are unset or uninitialized during the transition. For additional information, see the phase instruction.