> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGTextureAddressComputer::GetTexelCoordinate

> 計算相對於資源基底位址之指定位移的紋素元素座標。

計算相對於資源基底位址之指定位移的紋素元素座標。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT GetTexelCoordinate(
         UINT64 Offset,
         UINT32 *Plane,
         UINT32 *MipLevel,
         UINT64 *X,
         UINT32 *Y,
         UINT32 *ZOrSlice,
         UINT32 *Sample
)  
```

<a id="ID4EG" />

### 參數

*Offset*   \_In\_<br />類型：UINT64

紋素相對於基底位址的位移。

*Plane*   \_Out\_opt\_<br />類型：UINT32\*

紋素的平面。

*MipLevel*   \_Out\_opt\_<br />類型：UINT32\*

紋素的 mip 層級。

*X*   \_Out\_opt\_<br />類型：UINT64\*

紋素的 x 座標。

*Y*   \_Out\_opt\_<br />類型：UINT32\*

紋素的 y 座標。

*ZOrSlice*   \_Out\_opt\_<br />類型：UINT32\*

紋素的 Z 或切片。

*Sample*   \_Out\_opt\_<br />類型：UINT32\*

紋素的取樣索引。

<a id="ID4EP" />

### 傳回值

類型：[HRESULT](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

如果成功，則傳回 **S\_OK**；否則傳回錯誤碼。如需錯誤碼的清單，請參閱[錯誤碼](/zh-TW/reference/errorcodes)。如果函式因位移不在資源的記憶體範圍內而失敗，傳回值會設為 **E\_INVALIDARG**。

<a id="requirements" />

## 需求

**標頭：** xg.h

**程式庫：** xg\_x.lib

**支援的平台：** XBOX One 系列

<a id="ID4EKC" />

## 另請參閱

[XGTextureAddressComputer](/zh-TW/reference/graphics/xg__NR/interfaces/XGTextureAddressComputer/xgtextureaddresscomputer)<br />[XG 參考](/zh-TW/reference/graphics/xg__NR/xg_members)


## Related topics

- [Répertoire des rubriques NDA : liens actifs vers Microsoft Learn](/fr-CA/nda/nda-topic-directory.md)
- [NDA 토픽 디렉터리 - Microsoft Learn 라이브 링크](/ko/nda/nda-topic-directory.md)
- [Diretório de tópicos NDA: links ativos do Microsoft Learn](/pt-BR/nda/nda-topic-directory.md)
- [Directorio de temas NDA: enlaces activos a Microsoft Learn](/es/nda/nda-topic-directory.md)
- [NDA 主题目录 - Microsoft Learn 在线链接](/zh-CN/nda/nda-topic-directory.md)
