관련 색인이 없습니다.
texdepth (픽셀 셰이더)
 
Microsoft DirectX 9.0

texdepth (픽셀 셰이더)


이 픽셀에 대한 깊이 버퍼의 비교 테스트로 사용하는 깊이값을 계산한다.

구문

texdepth  dest

레지스터

dest
출력 레지스터.

주의

픽셀 셰이더의 버전1_11_21_31_42_02_x2_sw3_03_sw
texdepthx

이 명령은, 이 픽셀에 대한 깊이 버퍼의 비교 테스트로 r5.r / r5.g 를 사용한다. 파랑의 채널과 알파 채널의 데이터는 무시된다. r5.g = 0 의 경우, r5.r / r5.g 의 결과는 1.0 이다.

이 명령을 사용할 수 있는 레지스터는, 임시 레지스터 r5 뿐인다.

이 명령의 실행 후는, 셰이더내에서 임시 레지스터 r5 를 다른 목적으로 이용할 수 없다.

멀티 샘플링으로 이 명령을 사용하면 고해상도의 깊이 버퍼가 가지는 이점의 대부분이 없어진다. 픽셀 셰이더는 픽셀 마다 1 회 실행되므로, 서브 픽셀의 깊이 비교 테스트마다,texm3x2depth 또는 texdepth (픽셀 셰이더) 가 출력하는 단일의 깊이값이 사용된다.

texdepth 의 사용예를 다음에 나타낸다.

ps_1_4              
texld  r0, t0        // Sample texture from texture stage 0 (dest 
                     //   register number) into r0.
                     // Use texture coordinate data from t0.
texcrd r1.rgb, t1    // Load a second set of texture coordinate data into r1.
add    r5.rg, r0, r1 // Add the two sets of texture coordinate data.
phase                // Phase marker, required when using texdepth instruction.
texdepth  r5         // Calculate pixel depth as r5.r / r5.g.
                     // Do other color calculations with shader output r0.
					

시스템 요건

최저한의 operating system Windows 98


© 2002 Microsoft Corporation. All rights reserved.
↑TOP