Pixel Shader Differences

Instruction Slots

Each version supports a different number of maximum instruction slots.

Version Maximum number of instruction slots
ps_1_1 4 texture + 8 arithmetic
ps_1_2 4 texture + 8 arithmetic
ps_1_3 4 texture + 8 arithmetic
ps_1_4 6 texture + 8 arithmetic per phase
ps_2_0 32 texture + 64 arithmetic
ps_2_x 96 minimum, and up to the number of slots in D3DCAPS9.D3DPSHADERCAPS2_0.NumInstructionSlots. See D3DPSHADERCAPS2_0.
ps_3_0 512 minimum, and up to the number of slots in D3DCAPS9.MaxPixelShader30InstructionSlots. See D3DPSHADERCAPS2_0.

For information about the limitations of software shaders, see Software Shaders.

Flow Control Nesting Limits

ps_1_x Features

New instructions:

See ps_1_1, ps_1_2, ps_1_3, ps_1_4 Instructions.

New registers:

See ps_1_1__ps_1_2__ps_1_3__ps_1_4 Registers.

ps_2_0 Features

New features:

New instructions:

New registers:

ps_2_x Features

New features (See D3DPSHADERCAPS2_0.):

New instructions:

New registers:

ps_3_0 Features

New features:

New instructions:

New registers: