sample.Operator[][] function
Retrieves a value from the resource at the location and sample index provided.
R sample.Operator[][](
in uint sampleSlice,
in uint2 pos
);
sampleSlice [in]
Type: uintThe sample slice index.
pos [in]
Type: uint2The index position. The components contain the (x, y) coordinates.
Type: R
A read-only resource variable.
Texture2DMS<float4, 8> tex;
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 |