Share via


Texture2DArray::GatherRed (S,float,int) 函式

傳回四個材質值的紅色元件,這些值會用於雙向線性篩選作業。

語法

TemplateType GatherRed(
  in sampler s,
  in float3 location,
  in int2 offset
);

參數

s [in]

類型: 取樣器

以零起始的取樣器索引。

位置 [in]

類型: float3

範例座標 (u,v) 。

offset [in]

類型: int2

取樣之前套用至紋理座標的位移。

傳回值

類型: TemplateType

四個元件值,其類型與範本類型相同。

備註

紋理樣本可用於雙線性插補。

下列著色器類型支援此函式:

頂點 船體 網域 幾何形狀 像素 計算
x x x x x x

 

另請參閱

GatherRed 方法

著色器模型 5