Microsoft DirectX 8.0 (Visual Basic)

Pixel Shader Pipeline Order of Operations

You can control the states of the pixel shader pipeline throughout its execution by setting render states and texture stage states, and by calling the Direct3DDevice8.SetTexture, Direct3DDevice8.SetTextureStageState, Direct3DDevice8.SetPixelShader, and Direct3Ddevice8.SetPixelShaderConstant methods. These states and functions specify the flow of control in the pixel shader and the states of the steps in the pixel shader pipeline. The following diagram illustrates the order of these steps and the settings that most directly control them.

Depending on the value of the handle passed to SetPixelShader, either the fixed function or pixel shader pipeline is used in any one instance, but not both. The depth stencil test may occur prior to the time indicated by the figure, but this does not affect the results of the color pipeline. When stepping through a shading algorithm, keep in mind the various pipeline operations that can clamp values.