dcl_samplerType (sm2, sm3 - ps asm)

Declare a pixel shader sampler.

Syntax

dcl_samplerType s#

 

where:

  • _samplerType defines the sampler data type. This determines how many coordinates are required by each texture coordinate when sampling. The following texture coordinate dimensions are defined.
    • _2d
    • _cube
    • _volume
  • s# identifies a sampler where s is an abbreviation for the sampler, and # is the sampler number. Samplers are pseudo registers because you cannot directly read or write to them.

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
dcl_samplerTypexxxxx

 

All dcl_samplerType instructions must appear before the first executable instruction.

Example



dcl_cube t0.rgb;  // Define a 3D texture map.

add r0, r0, t0;   // Perturb texture coordinates. 
texld r0, s0, r0; // Load r0 with a color sampled from stage0
                  //   at perturbed texture coordinates r0.
                  // This is a dependent texture read.


 

 

Community Additions

ADD
Show:
© 2014 Microsoft