Texture2D::GatherCmpRed(S,float,float,int,uint) function

For four texel values that would be used in a bi-linear filtering operation, returns a comparison of their red component against a compare value along with tile-mapping status.


TemplateType GatherCmpRed(
  in  SamplerState S,
  in  float        Location,
  in  float        CompareValue,
  in  int          Offset,
  out uint         Status


S [in]

Type: SamplerState

The zero-based sampler index.

Location [in]

Type: float

The sample coordinates (u,v).

CompareValue [in]

Type: float

A value to compare each against each sampled value.

Offset [in]

Type: int

The offset applied to the texture coordinates before sampling.

Status [out]

Type: uint

The status of the operation. You can't access the status directly; instead, pass the status to the CheckAccessFullyMapped intrinsic function. CheckAccessFullyMapped returns TRUE if all values from the corresponding Sample, Gather, or Load operation accessed mapped tiles in a tiled resource. If any values were taken from an unmapped tile, CheckAccessFullyMapped returns FALSE.

Return value

Type: TemplateType

A four-component value whose type is the same as the template type.


The texture samples can be used for bilinear interpolation.

This function is supported for the following types of shaders:

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


See also

GatherCmpRed methods