Texture2DMSArray::sample.Operator function

Returns a read-only resource variable.

Syntax

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

Parameters

sampleSlice [in]

Type: uint

The sample slice index.

pos [in]

Type: uint3

The index position. The first and second components contain the (x, y) coordinates. The third component indicates the desired array slice.

Return value

Type: R

A read-only resource variable.

Remarks

Usage Example

Texture2DMSArray<float4, 4> alpha;

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

This function is supported for the following types of shaders:

Vertex Hull Domain Geometry Pixel Compute
x x x x x x

 

See also

Texture2DMSArray

Shader Model 5