Export (0) Print
Expand All

GatherCmp(S,float,float,int) function

Samples a texture, tests the samples against a compare value, and returns all four components.

Syntax

float4 GatherCmp(
  in  SamplerComparisonState s,
  in  float3 location,
  in  float compare_value,
  in  int2 offset
);

Parameters

s [in]

Type: SamplerComparisonState

The zero-based sampler index.

location [in]

Type: float3

The sample coordinates (u,v).

compare_value [in]

Type: float

A value to compare each against each sampled value.

offset [in]

Type: int2

An offset that is applied to the texture coordinate before sampling.

Return value

Type: float4

A four-component value, each component is the result of a per-component comparison.

Remarks

The texture samples can be used for bilinear interpolation.

This function is supported for the following types of shaders:

VertexHullDomainGeometryPixelCompute
xxxxxx

 

See also

Shader Model 5

 

 

Community Additions

ADD
Show:
© 2014 Microsoft