dcl_samplerType(sm2, sm3 - ps asm)

픽셀 셰이더 샘플러를 선언합니다.

Syntax

dcl_samplerType s#

 

여기서

  • _samplerType은 샘플러 데이터 형식을 정의합니다. 이는 샘플링할 때 각 텍스처 좌표에 필요한 좌표 수를 결정합니다. 다음 텍스처 좌표 차원이 정의됩니다.
    • _2d
    • _cube
    • _volume
  • s#은 샘플러를 식별합니다. 여기서 s는 샘플러의 약어이고 #은 샘플러 번호입니다. 샘플러는 직접 읽거나 쓸 수 없기 때문에 의사 레지스터입니다.

설명

픽셀 셰이더 버전 1_1 1_2 1_3 1_4 2_0 2_x 2_sw 3_0 3_sw
dcl_samplerType x x x x x

 

모든 dcl_samplerType 명령은 첫 번째 실행 가능한 명령 앞에 나타나야 합니다.

예제

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.

픽셀 셰이더 명령