Texture2D::GatherCmpGreen (S,float,float,int) 函数

对于将在双线性筛选操作中使用的四个纹素值, 返回其绿色分量与比较值的比较。

语法

float4 GatherCmpGreen(
  in SamplerComparisonState s,
  in float2 location,
  in float compare_value,
  in int2 offset
);

parameters

s [in]

类型: SamplerComparisonState

从零开始的采样器索引。

location [in]

类型: float2

示例坐标 (u,v) 。

compare_value [in]

类型: float

一个值,用于将每个值与每个采样值进行比较。

offset [in]

类型: int2

采样前应用于纹理坐标的偏移量。

返回值

类型: float4

一个四分量值,每个组件是每个组件比较的结果。

备注

纹理样本可用于双线性内插。

以下类型的着色器支持此函数:

顶点 外壳 Geometry 像素 计算
x x x x x x

 

另请参阅

GatherCmpGreen 方法

着色器模型 5