I try to keep this information up to date and accurate. If you notice any errors please send me email.

The following pages are the updated information from Real-Time Shader Programming.

Pixel Shader Input Registers

Pixel Shader Output Registers

Pixel Shader Instruction Modifiers

Pixel Shader Instruction Reference

Pixel Shader Revision History


These are the revisions history of pixel shaders: Each section contains the changes from the previous version. There were significant changes made to pixel shaders for version 1.4 and 2.0

DirectX 9.0

Version 3.0
Pixel Shader 3.0 specification was added.

Version 2.0
Texture and arithmetic instructions can be mixed.

Floating point register support (16 and 32-bit) added.

The cnd and phase instructions removed.

The exp, frc, log, rcp, texlb, texlp and rsq instructions were added.

The abs, crs, lrp, max, min, nrm and pow macros were added.

The lrp instruction was changed to a macro.

All source modifiers except negate removed.

All instruction modifiers except saturate removed.

Partial precision hint added.

Co-issue was removed.

Multi-Element Texture now specified as output.

Constants now default to a 0,0,0,0 value.

The number of constant registers was increased to thirty two.

Sixteen sample registers were added.

DirectX 8.1

Version 1.4
The phase, bem, texcrd, texdepth, texld, instructions added.

Dropped support for all texture address instructions except texkill.

Texture registers are read-only and can only be used in texture addressing instructions.

The read port limit for texture registers decreased to one because they can't be used in arithmetic instructions.

The number of temporary registers increased to six.

The read port limit for temporary registers increased to three.

The caps bit for MaxTextureRepeat must be at least eight (from one)

_x8, _d4, _d8 instruction modifiers added.

_x2 source register modifier added.

.r, .g source register selectors added.

.r, .g, .b destination mask added.

Version 1.3
The texm3x2depth instruction added.

Version 1.2
The cmp, dp4, texdp3, texdp3tex, texm3x3, texreq2rgb instructions added.

The read port limit for texture registers increased from two to three. The .b argument modifier added.

Version 1.1
Texture registers are no longer read-only.

The read port limit for texture register and vertex color registers increased from one to two.

.b register selectors added.

Arithmetic operations can use more register types as source registers.

Version 1.0
Initial release of pixel shaders.