|Microsoft DirectX 9.0|
A pixel shader input sampling stage register identifies a sampling unit that can be used in texture load statements. A sampling unit is initialized with IDirect3DDevice9::SetSamplerState. Prior to Microsoft?DirectX?9.0, the sampling state was initialized with IDirect3DDevice9::SetTextureStageState.
There are 16 pixel shader sampling stage registers: s0 to s15. Therefore, up to 16 texture surfaces can be read in a single shader pass. The instructions that use a sampler register are texld and texldp.
Sampling Stage Register
Sampler registers must be declared before use with the dcl_textureType instruction.
Pixel shader versions 1_1 1_2 1_3 1_4 2_0 2_sw 2_x 3_0 3_sw Sampler Register x x x x x
- A sampling stage register identifies the sampling unit to be used in texture load statements. A sampling unit corresponds to the texture sampling stage of DirectX 6.0 or DirectX 7.0 multi-texture, encapsulating the sampling-specific state provided in the TextureStageState constant of DirectX 6.0 to DirectX 8.x. This state information can be defined in its declarator statement.
- Each sampler uniquely identifies a single texture surface that is set to the corresponding sampler using IDirect3DDevice9::SetTexture. However, the same texture surface can be set at multiple samplers.
- They are read-only registers.
- Sampling a texture with a higher dimension than is present in the texture coordinates is illegal. Sampling a texture with a lower dimension than is present in the texture coordinates will ignore the extra texture coordinates.
Minimum operating systems Windows 98