ps_3_0
Microsoft DirectX 9.0 SDK Update (October 2004)

ps_3_0


A programmable pixel shader is made up of a set of instructions that operate on pixel data. Registers transfer data in and out of the arithmetic logic unit (ALU). Additional control can be applied to modify the instruction, the results, or what data gets written out.

New Features

Add a face register. Add a position register. Color registers (v#) are now fully floating point and the texture coordinate registers (t#) have been consolidated. Input declarations take the usage names, and multiple usages are permitted for components of a given register.

Dynamic Flow Control

The device supports dynamic flow control (if bool, break, and break_comp). The depth of nesting ranges from 0 to 24.

Number of Temporary Registers

The number of temporary registers supported is 32.

Static Flow Control Nesting Depth

The call/callnz/call_pred can be nested to a maximum depth of 4. Independently, loop/rep instructions can be nested to a maximum depth of 4.

Arbitrary Swizzle

Arbitrary swizzle is supported. See Source Register Swizzling.

Gradient Instructions

Gradient instructions are supported. See dsx, dsy, and texldd.

Predication

Instruction predication is supported. See Predicate Register.

Dependent Read Limit

There are no dependent read limits.

Texture Instruction Limit

There is no limit on texture instructions.

Instruction Count

Each pixel shader is allowed anywhere from 512 up to the number of slots in MaxPixelShader30InstructionSlots (not more than 32768). The number of instructions run can be much higher because of the looping support. The in MaxPShaderInstructionsExecuted should be at least 2^16.

Sampler Count

The number of texture samplers available is 16.

Device Caps

If pixel s 3_0 is supported, the following caps are supported in hardware (at a minimum):

CapCapability
MaxTextureWidth, MaxTextureHeight4K each
MaxTextureRepeat8K
MaxAnisotropy16
PixelShaderVersion3_0
MaxPixelShader30InstructionSlots512
The following primitive caps are set:
  • D3DPMISCCAPS_MASKZ
  • All the cull modes: D3DPMISCCAPS_CULLNONE, D3DPMISCCAPS_CULLCW, D3DPMISCCAPS_MASKZ.
  • D3DPMISCCAPS_CULLCCW
  • D3DPMISCCAPS_CLIPPLANESCALEDPOINTS
  • D3DPMISCCAPS_CLIPTLVERTS
  • D3DPMISCCAPS_BLENDOP
  • D3DPMISCCAPS_FOGINFVF
The following raster caps are set:
  • RasterCaps
  • RasterCaps
  • RasterCaps
  • RasterCaps
Full support for depth bias including:
  • RasterCaps
  • RasterCaps
Full set of comparisons for depth and alpha test including:
  • ZCmpCaps
  • ZCmpCaps
  • ZCmpCaps
  • ZCmpCaps
  • ZCmpCaps
  • ZCmpCaps
  • ZCmpCaps
  • ZCmpCaps
Source blending modesAll blending modes are supported as a source (except SrcBlendCaps, SrcBlendCaps, and SrcBlendCaps).
The following texture caps are supported:
  • D3DPTEXTURECAPS_PERSPECTIVE
  • D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
  • D3DPTEXTURECAPS_PROJECTED
  • D3DPTEXTURECAPS_CUBEMAP
  • D3DPTEXTURECAPS_VOLUMEMAP
  • D3DPTEXTURECAPS_MIPMAP
  • D3DPTEXTURECAPS_MIPVOLUMEMAP
  • D3DPTEXTURECAPS_MIPCUBEMAP
The following are supported on texture filter caps, volume texture filter caps and cube texture filter caps:
  • D3DPTFILTERCAPS_MINFPOINT
  • D3DPTFILTERCAPS_MINFLINEAR
  • D3DPTFILTERCAPS_MINFANISOTROPIC: This is not required for VolumeTextureFilterCaps and CubeTextureFilterCaps.
  • D3DPTFILTERCAPS_MIPFPOINT
  • D3DPTFILTERCAPS_MIPFLINEAR
  • D3DPTFILTERCAPS_MAGFPOINT
  • D3DPTFILTERCAPS_MAGFLINEAR
The following texture address modes are supported at vertex and pixel stages:
  • TextureAddressCaps
  • TextureAddressCaps
  • TextureAddressCaps
  • TextureAddressCaps
  • TextureAddressCaps
  • TextureAddressCaps
All the pixel shader caps are supported.
  • DynamicFlowControlDepth is 24
  • NumTemps is 32
  • StaticFlowControlDepth is 4
  • NumInstructionSlots is 512
  • Predication is supported.
  • Arbitrary swizzles are supported.
  • Gradient instructions.
  • No dependent read limit.
  • No limit on the mix of tex and math instructions.
All the stencil operations are supported.
Two sided stencil is supportedD3DSTENCILCAPS_TWOSIDED
Device support point size per vertexFVFCaps
Non-power of 2 texture support.Either full support or conditional non-pow-2 support. Device should not have the square texture only limitation: TextureCaps.
If the device supports multiple rendertargets, the following caps are supported:
  • D3DPMISCCAPS_INDEPENDENTWRITEMASKS
  • D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING
If vs_3_0 is supportedMaxUserClipPlanes is 6


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.