Microsoft DirectX 8.0 (Visual Basic)

Post-Shader Pixel Processing

In Microsoft® DirectX® 8.0, pixel processing such as fog blending, stencil operations, and render target blending occur after execution of the shader. Render target blending syntax is updated to support new features as described in this topic.

Pixel Shader Inputs

In DirectX 8.0, all colors—diffuse and specular—declared in the texture registers are assumed saturated (clamped) to the range 0 through 1 before use by the shader because this is the range of valid inputs to the shader. Position is assumed to be clipped before the execution of the pixel shader.

All iterated values are assumed by the pixel shader to be iterated-perspective correct, but this is not guaranteed in all hardware. Colors generated as texture coordinates by the address shader are always iterated in a perspective correct manner. However, they are also clamped to the range 0 to 1 during iteration.

Pixel Shader Outputs

The result emitted by the pixel shader is the contents of register r0. Whatever it contains when the shader completes processing is sent to the fog stage and render target blender.