Texture coordinate register (HLSL PS reference)

Pixel shader input register containing texture coordinates.

Pixel shader versions 1_1 1_2 1_3 1_4 2_0 2_sw 2_x 3_0 3_sw
Texture Coordinate Register x x x x x


A texture coordinate register contains texture coordinate data. Before a texture coordinate register is used, it must be declared by a pixel shader declaration. For details about how to declare a texture register, see dcl - (sm2, sm3 - ps asm).

In addition, here are some other properties of texture coordinate registers.

  • There are eight pixel-shader texture coordinate registers, t0 to t7.
  • These are read-only registers.
  • They contain four-component RGBA values iterated from input vertices.
  • They contain high precision, high dynamic range data values interpolated from the vertex data. Values are generated with perspective-correct interpolation. Data is floating-point precision, and is signed.
  • There is a maximum of one in a single instruction.
  • Multiple reads of a texture coordinate register within a shader must use identical Destination Register Write Mask.
  • The optional partial precision modifier [_pp] applies to dependent reads. This is because partial precision affects arithmetic operations involving the texture coordinate register. It will not affect the precision of texture address instructions because it does not affect the texture coordinate iterators.