Microsoft DirectX 9.0

Registers - ps_2_x

Pixel shaders depend on registers to get vertex data, to output pixel data to the rasterizer, to hold temporary results during calculations and to identify texture sampling stages. There are several types of registers, each with a unique functionality. This section contains reference information for the input and output registers implemented by pixel shader version 2_x.

There is one additional register introduced in this version. It is used for predication.

Input Register Types

NameRegister typeCountR/W# Read ports# Reads/instDimensionRelAddrDefaultsRequires DCL
v#Color Register2R1Unlimited4NPartial(0001)N
r#Temporary Register32R/W3Unlimited4NNoneN
c#Constant Float Register224R1Unlimited4N0000N
i#Constant Integer Register16R114N0000N
b#Constant Boolean Register16R111NFALSEN
s#Sampler Register16R114NDepends*Y
t#Input Texture Coordinate Register8R111NNoneY


Output Register Types

NameRegister typeCountR/W# Read ports# Reads/instDimensionRelAddrDefaults Requires DCL
oC#Output Color RegisterSee Multielement Texturew004NNoneN
oDepthOutput Depth Register1W001NNoneN


© 2002 Microsoft Corporation. All rights reserved.