共用方式為


Texture2DMSArray::sample。運算子函式

傳回唯讀資源變數。

語法

R sample.Operator[][](
  in uint sampleSlice,
  in uint3 pos
);

參數

sampleSlice [in]

類型: uint

範例配量索引。

pos [in]

類型: uint3

索引位置。 第一個和第二個元件包含 (x、y) 座標。 第三個元件表示所需的陣列配量。

傳回值

類型: R

唯讀資源變數。

備註

使用範例

Texture2DMSArray<float4, 4> alpha;

float4 main( float3 tcoord : texturecoord0 ) : SV_Target
{
     return s_msTexture.sample[2][tcoord];
}

下列著色器類型支援此函式:

頂點 船體 網域 幾何形狀 像素 計算
x x x x x x

 

另請參閱

Texture2DMSArray

著色器模型 5