Microsoft DirectX 8.0 (Visual Basic)

Processing Pixel Data

For the purpose of understanding how pixel data is processed by the virtual machine, imagine an orange sphere that you want to bump map and place into an environment where lights will shine on its surface. For this simple scenario, assume that the orange color is interpolated using the triangles that form the sphere. The orange color is interpolated from the data passed down the oD0 channel of the vertex shader, and as such, each pixel is presented to the pixel shader through the v0 register.

The following topics trace the steps needed to render the final image of the orange sphere with the bump and environment map data.

Although this section uses a specific example to illustrate how the pixel shader virtual machine processes data, the principles and steps demonstrated are valid for developing a variety of pixel shaders.