SampleCmp::SampleCmp(S,float,float,float) function for TextureCubeArray

Samples a texture, using a comparison value to reject samples, with an optional value to clamp sample level-of-detail (LOD) values to.

Syntax

DXGI_FORMAT SampleCmp(
  in SamplerState S,
  in float        Location,
  in float        CompareValue,
  in float        Clamp
);

Parameters

S [in]

Type: SamplerState

A Sampler state. This is an object declared in an effect file that contains state assignments.

Location [in]

Type: float

The texture coordinates. The argument type is dependent on the texture-object type.

Texture-Object Type Parameter Type
Texture1D float
Texture1DArray, Texture2D float2
Texture2DArray, Texture3D, TextureCube float3
TextureCubeArray float4

 

CompareValue [in]

Type: float

A floating-point value to use as a comparison value.

Clamp [in]

Type: float

An optional value to clamp sample LOD values to. For example, if you pass 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.

Return value

Type: DXGI_FORMAT

The texture format, which is one of the typed values listed in DXGI_FORMAT.

See also

SampleCmp methods

TextureCubeArray